Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid some unnecessary redirects #1953

Merged
merged 2 commits into from
Feb 26, 2025
Merged

Avoid some unnecessary redirects #1953

merged 2 commits into from
Feb 26, 2025

Conversation

b9a1
Copy link
Contributor

@b9a1 b9a1 commented Feb 21, 2025

Changes

  • A new GitHub Actions variable EXTERNAL_HTTPS will need to be (manually) set to true on this repository, either in the environment scope or in the repository scope. Forks of this repository may do the same based on instructions in ARCHITECTURE.md.
  • The --baseURL option of Hugo for the official git-scm.com site will be changed from http://git-scm.com/ to https://git-scm.com/ (with only a different scheme).
  • Playwright tests will be run directly against GitHub Pages (as opposed to gateways like Cloudflare) for any domain, not just for git-scm.com.
  • Playwright tests will be run with HTTP or HTTPS depending solely on the base URL scheme, which means git-scm.com will be tested with HTTPS, while other domains may be tested with HTTP if they don’t support HTTPS. This differs from the current strategy of using HTTP for git-scm.com and HTTPS for others.
  • A new test will be run during each deployment to ensure that downgrades to unencrypted HTTP never happen, as long as the base URL is HTTPS.
  • Hyperlinks to download pages will be updated to reflect current path structure.

Context

Currently, clicking the most prominent download button on https://git-scm.com/ causes three navigations:

  1. https://git-scm.com/download/win, the hyperlink destination (assuming a Windows system), which is an alias to…
  2. http://git-scm.com/downloads/win, with an http scheme, resulting in a 301 Moved Permanently to…
  3. https://git-scm.com/downloads/win, which is the canonical URL.

This PR avoids both types of redundant redirects above (HTTPS to HTTP and download to downloads) so the button (and some other links mentioned in the commit message) opens the canonical URL directly. Tests are also updated to accomondate for this change.

In addition, this PR might serve as a better fix for #1898, which was supposed to be solved by #1899, by always running Playwright tests with HTTPS. However, that fix requires serveral conditions to work:

  1. Since only git-scm.com was resolved to the GitHub Pages server in /etc/hosts, other domains might be tested against a third‐party gateway, which needs to be able to speak HTTPS.
  2. The tested server must have a valid TLS certificate for the domain.
  3. The test cases would expect https://git-scm.example/book to redirect to https://git-scm.example/book/en/v2, but this redirection depends on the base URL, so at least one of the following must be true:
    a. The base URL already has an https scheme.
    b. The tested server enforces HTTPS, so the final URL always says https even if the base URL doesn’t.

The official domain (git-scm.com) didn’t meet condition 2, thus d4f88c1. The fork domain in #1898 (ttaylorr.com), however, met all of 1, 2 and 3b, so it was fixed, but the issue remains for other domains.

Conveniently, this PR lifts all the requirements above (respectively) by:

  1. Always run Playwright tests against a server that supports HTTPS (i.e. GitHub Pages), not just for the git-scm.com domain.
  2. Tell Playwright to ignore HTTPS errors, if (and only if) the certificate might be invalid (i.e. when EXTERNAL_HTTPS=true).
  3. Set the base URL scheme selectively so there is no more bouncing around between HTTP and HTTPS.

In fact, the last change alone is sufficient to fix #1898, while the first two are kept for the original purpose of bypassing caches. This also removes the need to special‐case git-scm.com in the workflow, thereby simplifying the deployment logic.

b9a1 added 2 commits February 21, 2025 23:43
The official `git-scm.com` website is currently built by Hugo with
`--baseURL http://git-scm.com/`. This commit allows changing the URL
scheme to `https`, in order to avoid unnecessary redirects between
HTTPS and unencrypted HTTP.

Such redirects occur when one of the following URLs is requested:

* URLs in `layouts/alias.html`, e.g. in <https://git-scm.com/docs/>
* Image URLs in <https://git-scm.com/application.min.css>
* Endpoint URLs in <https://git-scm.com/sitemap.xml>

Since these URLs have the `http` scheme, the client is supposed to send
the new request unencrypted, only to be told by the server to use HTTPS
again. Modern web browsers tend to stick with HTTPS in certain cases,
so the downgrade may not always happen, but it's better to eliminate
the redirects nevertheless, for security and performance reasons.

Instead of trying to use relative URLs everywhere, this commit takes a
simpler approach by using the `https` scheme in the base URL. One way
to do this is to enable the "Enforce HTTPS" option in the GitHub Pages
settings, but it's infeasible because the `git-scm.com` domain points to
Cloudflare instead of GitHub.

Therefore, this commit introduces a GitHub Actions variable,
`EXTERNAL_HTTPS`, which can be set to true if HTTPS is provided by a
third party, so that the URL scheme can be safely overridden. This also
generalizes the special case of `git-scm.com` for any domain with a
similar setup, allowing tests to be run more reliably in a uniform way.

See-also: c22a1a5 (deploy(playwright): work around externally-enforced HTTPS, 2024-10-07)
See-also: d4f88c1 (deploy: be more careful when auto-upgrading from HTTP -> HTTPS, 2024-10-07)
Since the download pages now live in `/downloads`, update the existing
links to save an extra redirect.
@dscho
Copy link
Member

dscho commented Feb 24, 2025

  • A new GitHub Actions variable EXTERNAL_HTTPS will need to be (manually) set to true on this repository, either in the environment scope or in the repository scope. Forks of this repository may do the same based on instructions in ARCHITECTURE.md.

  • The --baseURL option of Hugo for the official git-scm.com site will be changed from http://git-scm.com/ to https://git-scm.com/ (with only a different scheme).

I fear that this part is somewhat orthogonal to the purpose of this PR, and is caused by a misconfiguration of the site. When I direct my browser to https://github.com/git/git-scm.com/settings/pages, I see:

image

The most important bit to which I would like to draw your attention, in particular, is this part:

That troubleshooting link has a couple of hints how to diagnose and fix this, but I have no access to the DNS records (neither do I want to, heck, I thought I was done over here in git-scm.com).

Unless I am mistaken, this means that people who do control the domain git-scm.com, i.e. @peff and @ttaylorr, have to have a look at (and ideally fix) this part so that HTTPS is enforced on the GitHub side and the base URL is configured correctly to use https:// instead of http:// (currently, you can see that https://git-scm.com/ incorrectly links to http://git-scm.com/images/bg/body.jpg, for example, which is a consequence of this misconfiguration).

@ttaylorr
Copy link
Member

Unless I am mistaken, this means that people who do control the domain git-scm.com, i.e. @peff and @ttaylorr, have to have a look at (and ideally fix) this part so that HTTPS is enforced on the GitHub side and the base URL is configured correctly to use https:// instead of http://

Hmm. I initially thought that this GitHub hadn't rechecked git-scm.com's DNS records since you and I configured it towards the end of last year. So I followed the guide and dropped then re-added the custom domain to force a refresh of the DNS records.

GitHub did re-check those records, but the end result was the same. Looking through the rest of the troubleshooting documentation, it looks like this line is important:

Make sure your site does not:

  • Use both an apex domain and custom subdomain. For example, both example.com and docs.example.com.

While GitHub makes an exception for the the apex "www" (i.e. that having www.git-scm.com in addition to www.git-scm.com doesn't count as a "custom subdomain"), I think we are violating this rule since we have book.git-scm.com in addition to git-scm.com (as well as `www.git-scm.com, but this one shouldn't matter).

So unfortunately I don't think that it is currently possible to enforce HTTPS based on my understanding of those troubleshooting docs. 😞

@peff
Copy link
Member

peff commented Feb 24, 2025

Would GitHub's "enforce https" flag do anything anyway? Users visiting git-scm.com are terminating at Cloudflare, which is then talking to GitHub (well, GitHub's CDN) on the backend and proxying/caching. And Cloudflare does issue a redirect from http to https.

So from the user's perspective, everything is always going to be https. And any links generated on the site should prefer https. I don't know anything about the Hugo setup, but naively I'd think that means the baseurl should be https (most links will just be relative, of course, but it looks like all of the scss stuff uses $baseurl).

@peff
Copy link
Member

peff commented Feb 24, 2025

I also wonder if using Cloudflare is doing much these days. GitHub Pages are served off a CDN, too. So we are just stacking caches in front of caches (whereas when we originally started using Cloudflare, it was sitting in front of a Heroku dyno that was getting sorely hammered).

@ttaylorr
Copy link
Member

I also wonder if using Cloudflare is doing much these days.

I wondered the same when @dscho and I were redirecting the Cloudflare configuration to point at the new GitHub Pages site. TBH I think that we could probably drop it for similar reasons as the ones you point out, but it seemed like an extra change amid the already-large rewrite, so I punted on it then. It might be worth reevaluating, I dunno.

@dscho
Copy link
Member

dscho commented Feb 25, 2025

Would GitHub's "enforce https" flag do anything anyway?

Yes. It is responsible for actions/configure-pages to use the correct protocol in its base_url output.

As a consequence, as I mentioned before, resources like images/bg/body.jpg are loaded using http:// instead of https:// in the current state.

@b9a1
Copy link
Contributor Author

b9a1 commented Feb 25, 2025

Thank you all for looking into this. While removing the Cloudflare caches is indeed a fix for the official site, I do want to mention that GitHub’s CDN (Fastly) can be less performant than Cloudflare in certain regions (which is also my personal experience), so there is a potential risk of inadvertently slowing down the site for some of the visitors.

The most important bit to which I would like to draw your attention, in particular, is this part:

I’m aware of this option, and this PR is an intentional workaround for it, in the belief that not everyone is able, or willing, to fix the “misconfiguration” and let GitHub handle their domain. Being able to configure git-scm.com properly would be great, but I’d like to provide a more general solution for forks.

@peff
Copy link
Member

peff commented Feb 26, 2025

Would GitHub's "enforce https" flag do anything anyway?

Yes. It is responsible for actions/configure-pages to use the correct protocol in its base_url output.

Sure, but that is something that can be overridden. I.e., I think that we know something that GitHub Pages does not, which is that there is an extra proxy layer sitting between the user and the hugo build.

dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
We do want to enforce HTTPS. And we kind of do, but not "kind of" enough
for GitHub's UI at https://github.com/git/git-scm.com/settings/pages to
allow us to check the box called "Enforce HTTPS".

The helpful comment next to the grayed out box says:

  [ ] **Enforce HTTPS** --- Unavailable for your site because your
  domain is not properly configured to support HTTPS
  ([`git-scm.com`](http://git-scm.com/)) --- [Troubleshooting custom
  domains](https://docs.github.com/articles/troubleshooting-custom-domains/#https-errors)

  HTTPS provides a layer of encryption that prevents others from
  snooping on or tampering with traffic to your site.
  When HTTPS is enforced, your site will only be served over HTTPS.
  [Learn more about securing your GitHub Pages site with
  HTTPS](https://docs.github.com/pages/getting-started-with-github-pages/securing-your-github-pages-site-with-https).

As discussed in git#1953, it would
appear to be outside our capabilities to fix this properly, therefore we
are unfortunately stuck with hard-coding a work-around: Manually
override the http:// URL produced by `actions/configure-pages` with the
equivalent https:// one.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho
Copy link
Member

dscho commented Feb 26, 2025

Would GitHub's "enforce https" flag do anything anyway?

Yes. It is responsible for actions/configure-pages to use the correct protocol in its base_url output.

Sure, but that is something that can be overridden. I.e., I think that we know something that GitHub Pages does not, which is that there is an extra proxy layer sitting between the user and the hugo build.

Correct, we could work around that problem. For example like this: #1956

The problem with that is: It is a work-around. And honestly, if we have that problem, so do others. If I was still working embedded in GitHub, i.e. with easy access to GitHub Pages engineers, I would want to help them fix this usability bug. So the best I can do is come up with a work-around. That is not the case for everybody involved in this here thread.

Copy link
Member

@dscho dscho left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I just left a couple of comments, mainly to demonstrate that I care about this issue and that I am grateful that you fixed it!

@dscho dscho merged commit c6a19e3 into git:gh-pages Feb 26, 2025
1 check passed
@dscho
Copy link
Member

dscho commented Feb 26, 2025

Sadly, there are errors:

http: URLs
2025-02-26T08:33:18.1178489Z public/book/mk/v2/Персонализација-на-Git-Git-Configuration.html:7606:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.1182141Z public/book/mk/v2/Appendix-A:-Git-во-други-околини-Graphical-Interfaces.html:7771:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.1186438Z public/book/mk/v2/Почеток-Инсталирање-на-Git.html:7586:<p>За повеќе опции, постојат инструкции за инсталирање на неколку различни Unix дистрибуции на веб-страницата на Git, на <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a> [].</p>
2025-02-26T08:33:18.1189082Z public/book/mk/v2/Почеток-Инсталирање-на-Git.html:7607:MacOS Git инсталерот се одржува и е достапен за преземање на веб-страницата на Git, на <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a> [].</p>
2025-02-26T08:33:18.1191317Z public/book/mk/v2/Почеток-Инсталирање-на-Git.html:7626:Само одете на <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> [] и преземањето ќе започне автоматски.
2025-02-26T08:33:18.1193421Z public/book/sr/v2/Додатак-А:-Програм-Гит-у-другим-окружењима-Графички-интерфејси.html:7776:Званични Гит веб сајт има одржавану листу најпопуларнијих клијената на адреси <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.1194753Z public/book/sr/v2/Почетак-Инсталирање-програма-Гит.html:7591:<p>За више опција, на Гит веб сајту (<a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>) се налазе инструкције за инсталирање на неколико различитих Јуникс дистрибуција.</p>
2025-02-26T08:33:18.1196054Z public/book/id/v2/Kostumisasi-Git-Konfigurasi-Git.html:7584:Anda juga bisa menemukan materi untuk rujukan ini di <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.1197577Z public/book/id/v2/Memulai-Memasang-Git.html:7569:<p>Untuk pilihan lebih banyak, ada banyak arahan untuk memasang pada beberapa jenis Unix yang berbeda pada situs web Git, di <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.1199075Z public/book/id/v2/Memulai-Memasang-Git.html:7583:Pemasang Git pada OS X dipelihara dan tersedia untuk diunduh pada situs web Git, pada <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.1200343Z public/book/id/v2/Memulai-Memasang-Git.html:7602:Pergi ke <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> dan unduhannya akan berjalan secara otomatis.
2025-02-26T08:33:18.1201750Z public/book/id/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7755:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.1203740Z public/book/pt-br/v2/Appendix-A:-Git-em-Outros-Ambientes-Graphical-Interfaces.html:7756:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.1205199Z public/book/pt-br/v2/Customizing-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.1777840Z public/book/pt-br/v2/Começando-Instalando-o-Git.html:7571:<p>Para mais opções de instruções de como instalar o Git em outros vários sistemas Unix, veja na página do Git, em <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.1780727Z public/book/pt-br/v2/Começando-Instalando-o-Git.html:7585:Um instalador OSX Git é mantido e disponível para download no site do Git, pelo <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.1783421Z public/book/pt-br/v2/Começando-Instalando-o-Git.html:7604:Basta ir ao <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> e o download começará automaticamente.
2025-02-26T08:33:18.1786247Z public/book/tl/v2/Pag-aangkop-sa-Sariling-Pangangailagan-ng-Git-Kompigurasyon-ng-Git.html:7585:Maaari mo ring mahanap ang materyal ng reperensya sa <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.1789173Z public/book/tl/v2/Pagsisimula-Pag-install-ng-Git.html:7559:<p>Para sa karagdagang mga opsyon, mayroong mga hakbang sa pag-install sa iilang iba-ibang mga Unix Flavors sa Git na website, sa <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.1792402Z public/book/tl/v2/Pagsisimula-Pag-install-ng-Git.html:7577:<p>Kung gusto mo ang isang mas bago na bersyon, maaari mo rin itong i-install sa pamamagitan ng isang binary na installer. Ang macOS Git na installer ay naka-maintain at mai-download mula sa Git na website, sa <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.1797048Z public/book/tl/v2/Pagsisimula-Pag-install-ng-Git.html:7593:Ang pinaka-opisyal na build ay mai-download mula sa Git na website. Pumunta lang sa <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> at ito ay awtomatikong mag-download. Tandaan na ito ay isang proyekto na tinatawag na Git para sa Windows, kung saan hiwalay sa mismong Git; para sa karagdagang impormasyon tungkol dito, pumunta sa <a href="https://git-for-windows.github.io/" class="bare">https://git-for-windows.github.io/</a>.</p>
2025-02-26T08:33:18.1803759Z public/book/tl/v2/Appendix-A:-Git-in-Other-Environments-Grapikal-Interfaces.html:7738:<p>Mayroong ilang iba pang mga grapikal na kliyente ng Git, at pinatakbo nila ang gamut mula sa mga espesyal, mga tool na nag-iisang layunin sa lahat ng paraan sa mga apps na subukang ilantad ang lahat ng magagawa ng Git. Ang opisyal na website ng Git ay may isang listahan ng mga pinakasikat na kliyente sa <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>. Ang isang mas malawak na listahan ay magagamit sa Git wiki na site, sa <a href="https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Graphical_Interfaces" class="bare">https://git.wiki.kernel.org/index.php/Interfaces,_frontends,_and_tools#Graphical_Interfaces</a>.</p>
2025-02-26T08:33:18.1809336Z public/book/zh-tw/v2/附錄-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7756:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.1812066Z public/book/zh-tw/v2/Customizing-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.1814717Z public/book/zh-tw/v2/開始-Git-安裝教學.html:7571:<p>如果需要更多選擇,Git 官方網站上有更多其他的發行版中安裝 Git 的安裝步驟,網址為 <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>。</p>
2025-02-26T08:33:18.1816577Z public/book/zh-tw/v2/開始-Git-安裝教學.html:7585:在 Git 官方網站上有維護最新版的安裝程式可供下載,網址在 <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>。</p>
2025-02-26T08:33:18.1818275Z public/book/zh-tw/v2/開始-Git-安裝教學.html:7604:你只需要連到 <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> 然後下載就會自動開始。
2025-02-26T08:33:18.2481568Z public/book/es/v2/Inicio---Sobre-el-Control-de-Versiones-Instalación-de-Git.html:7567:<p>Para opciones adicionales, la página web de Git tiene instrucciones de instalación en diferentes tipos de Unix.  Puedes encontrar esta información en <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.2485391Z public/book/es/v2/Inicio---Sobre-el-Control-de-Versiones-Instalación-de-Git.html:7581:Un instalador de Git para OSX es mantenido en la página web de Git.  Lo puedes descargar en <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.2488669Z public/book/es/v2/Inicio---Sobre-el-Control-de-Versiones-Instalación-de-Git.html:7600:Solo tienes que visitar <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> y la descarga empezará automáticamente.
2025-02-26T08:33:18.2491209Z public/book/es/v2/Personalización-de-Git-Configuración-de-Git.html:7614:<a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.2493993Z public/book/es/v2/Apéndice-A:-Git-en-otros-entornos-Interfaces-gráficas.html:7759:La página oficial de Git tiene una sucinta lista de los clientes más utilizados en <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.2496724Z public/book/uz/v2/Иш-бошланиши-Git-ни-ўрнатиш.html:7569:<p>Қўшимча имкониятлардан фойдаланиш учун, турли хил Unix тизимларига Git ни ўрнатиш бўйича кўрсатмалар учун  <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a> сайтга қаранг</p>
2025-02-26T08:33:18.2498790Z public/book/uz/v2/Иш-бошланиши-Git-ни-ўрнатиш.html:7583:Git ни OS X га ўрнатувчини юклаш имкони қуйидаги манзилдаги сайтда <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.2500734Z public/book/uz/v2/Иш-бошланиши-Git-ни-ўрнатиш.html:7602:Фақат <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> мурожаатга ўтинг ва юклаш автоматик тарзда бошланади.
2025-02-26T08:33:18.2502909Z public/book/uz/v2/Customizing-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.2505500Z public/book/uz/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7755:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.2508502Z public/book/pl/v2/Pierwsze-kroki-Instalacja-Git.html:7568:<p>Wiecej opcji - na stronie git znajdziesz instrukcje instalacji na różnych systemach Unix pod <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.2511312Z public/book/pl/v2/Pierwsze-kroki-Instalacja-Git.html:7583:instalatora. Instalator git dla OSX jest dostępny do pobrania na stronie gita <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.2514254Z public/book/pl/v2/Pierwsze-kroki-Instalacja-Git.html:7602:<a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> a pobieranie rozpocznie się automatycznie.
2025-02-26T08:33:18.2516839Z public/book/pl/v2/Dostosowywanie-Gita-Konfiguracja-Gita.html:7591:Ten materiał pomocniczy możesz również znaleźć na stronie <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.2519475Z public/book/pl/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7755:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.2522338Z public/book/it/v2/Per-Iniziare-Installing-Git.html:7569:<p>For more options, there are instructions for installing on several different Unix flavors on the Git website, at <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.3494997Z public/book/it/v2/Per-Iniziare-Installing-Git.html:7583:An OSX Git installer is maintained and available for download at the Git website, at <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.6590188Z public/book/it/v2/Per-Iniziare-Installing-Git.html:7602:Just go to <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> and the download will start automatically.
2025-02-26T08:33:18.6593350Z public/book/it/v2/Appendice-A:-Git-in-altri-contesti-Graphical-Interfaces.html:7755:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.6596117Z public/book/it/v2/Customizing-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.6599373Z public/book/cs/v2/Úvod-Instalace-systému-Git.html:7571:<p>Další možnosti naleznete v instrukcích pro instalaci na několika různých odrůdách Unixu. Nacházejí se na webovém serveru Gitu, na stránce <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.6602359Z public/book/cs/v2/Úvod-Instalace-systému-Git.html:7585:Instalátor Gitu pro OSX se udržuje na webové stránce Gitu <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a> a můžete si jej odtud stáhnout.</p>
2025-02-26T08:33:18.6605051Z public/book/cs/v2/Úvod-Instalace-systému-Git.html:7604:Skočte na stránku <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> a stahování se zahájí automaticky.
2025-02-26T08:33:18.6607227Z public/book/cs/v2/Customizing-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:18.6610053Z public/book/cs/v2/Appendix-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7756:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:18.6615649Z public/book/ko/v2/Git맞춤-Git-설정하기.html:7598:<a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a> 페이지에서도 같은 내용을 볼 수 있다.</p>
2025-02-26T08:33:18.6617794Z public/book/ko/v2/부록-A:-다양한-환경에서-Git-사용하기-GUI.html:7764:Git 공식 웹사이트인 <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>에는 많이 사용하는 클라이언트를 소개한다.
2025-02-26T08:33:18.6619696Z public/book/ko/v2/시작하기-Git-설치.html:7578:<p>다른 Unix 배포판에 설치하려면 <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a> 에서 확인하라.</p>
2025-02-26T08:33:18.6621576Z public/book/ko/v2/시작하기-Git-설치.html:7601:macOS용 Git 인스톨러는 Git 웹사이트에서 관리하고 있으며 <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a> 에서 내려받는다.</p>
2025-02-26T08:33:18.6623511Z public/book/ko/v2/시작하기-Git-설치.html:7620:<a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a>에 가면 자동으로 다운로드가 시작된다.
2025-02-26T08:33:18.6625739Z public/book/fa/v2/شروع-به-کار-نصب-گیت.html:7596:<p>برای گزینه‌های بیشتر می‌توانید دستورات نصب روی توزیع‌های مختلف یونیکس را روی سایت گیت به نشانی <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a> پیدا کنید.</p>
2025-02-26T08:33:18.6627824Z public/book/fa/v2/شروع-به-کار-نصب-گیت.html:7636:کافیست به <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> مراجه کنید و دانلود شما به طور خودکار شروع می‌شود.
2025-02-26T08:33:18.6629940Z public/book/ja/v2/Git-のカスタマイズ-Git-の設定.html:7592:この内容は、 <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a> にあるリファレンスでも見ることができます。</p>
2025-02-26T08:33:18.6632063Z public/book/ja/v2/付録-A:-その他の環境でのGit-グラフィカルインタフェース.html:7761:Gitのオフィシャルウェブサイトには、よく使われているクライアントのリストがあります。詳しくは <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a> を参照してください。
2025-02-26T08:33:18.6634297Z public/book/ja/v2/使い始める-Gitのインストール.html:7571:<p>そのほかにも、いくつかのLinuxディストリビューション用のインストール手順がGitのウェブサイト <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a> に掲載されています。</p>
2025-02-26T08:33:18.6636308Z public/book/ja/v2/使い始める-Gitのインストール.html:7587:OSX用のGitインストーラーはよくメンテナンスされており、Gitのウェブサイト <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a> からダウンロードできます。</p>
2025-02-26T08:33:18.6638305Z public/book/ja/v2/使い始める-Gitのインストール.html:7606:<a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> にアクセスすると、ダウンロードが自動で始まるようになっています。
2025-02-26T08:33:18.6640747Z public/book/gr/v2/Ξεκινώντας-με-το-Git-Εγκατάσταση-του-Git.html:7006:<p>Για περισσότερες επιλογές, μπορείτε να βρείτε οδηγίες για την εγκατάστασή του Git σε διάφορες διανομές του Linux στην ιστοσελίδα <a href="http://git-scm.com/download/linux" class="bare" target="_blank" rel="noopener">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.6643738Z public/book/gr/v2/Ξεκινώντας-με-το-Git-Εγκατάσταση-του-Git.html:7027:Ένας installer του Git για macOS είναι διαθέσιμος για λήψη στην ιστοσελίδα του Git, <a href="http://git-scm.com/download/mac" class="bare" target="_blank" rel="noopener">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.6646188Z public/book/gr/v2/Ξεκινώντας-με-το-Git-Εγκατάσταση-του-Git.html:7046:Απλά πηγαίνετε στο <a href="http://git-scm.com/download/win" class="bare" target="_blank" rel="noopener">http://git-scm.com/download/win</a> και η λήψη θα ξεκινήσει αυτόματα.
2025-02-26T08:33:18.6648165Z public/book/gr/v2/Τα-θεμελιώδη-στοιχεία-του-Git-Καταγραφή-αλλαγών-στο-αποθετήριο.html:19870:Μπορούμε επίσης να βρούμε αυτό το υλικό αναφοράς στη διεύθυνση http://git-scm.com/docs/git-config.html[].
2025-02-26T08:33:18.6650240Z public/book/uk/v2/Вступ-Інсталяція-Git.html:7586:<p>Для отримання додаткових можливостей, чи інструкцій з інсталяції для декількох різновидів Unix, скористайтеся сайтом Git <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:18.6653284Z public/book/uk/v2/Вступ-Інсталяція-Git.html:7607:Інсталятор для macOS Git підтримується та доступний для завантаження на сайті Git <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:18.6655356Z public/book/uk/v2/Вступ-Інсталяція-Git.html:7626:Просто перейдіть до <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> і завантаження почнеться автоматично.
2025-02-26T08:33:18.6657563Z public/book/uk/v2/Додаток-A:-Git-в-інших-середовищах-Графічні-інтерфейси.html:7771:Офіційний сайт Git має вибірку найпопулярніших клієнтів за адресою <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:19.4215916Z public/book/uk/v2/Налаштування-Git-Конфігурація-Git.html:7606:Також ви можете знайти цю інформацію на <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:19.4217262Z public/book/pt-pt/v2/Personalizar-o-Git-Git-Configuration.html:7591:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:19.4218837Z public/book/pt-pt/v2/Appendix-A:-Git-em-Outros-Ambientes-Graphical-Interfaces.html:7756:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:19.4221517Z public/book/pt-pt/v2/Começando-Instalar-o-Git.html:7564:<p>Para mais opções de instruções de como instalar o Git em outros vários sistemas Unix, vê na página do Git, em <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:19.4223481Z public/book/pt-pt/v2/Começando-Instalar-o-Git.html:7585:Um instalador OSX Git é mantido e disponível para download no site do Git, pelo <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:19.4224878Z public/book/pt-pt/v2/Começando-Instalar-o-Git.html:7603:Basta ir ao <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> e o download começará automaticamente.
2025-02-26T08:33:19.4226271Z public/book/sv/v2/Bilaga-A:-Git-in-Other-Environments-Graphical-Interfaces.html:7766:The official Git website has a curated list of the most popular clients at <a href="http://git-scm.com/downloads/guis" class="bare">http://git-scm.com/downloads/guis</a>.
2025-02-26T08:33:19.4227923Z public/book/sv/v2/Customizing-Git-Git-Configuration.html:7601:You can also find this reference material at <a href="http://git-scm.com/docs/git-config.html" class="bare">http://git-scm.com/docs/git-config.html</a>.</p>
2025-02-26T08:33:19.4229721Z public/book/sv/v2/Kom-igång-Installera-Git.html:7581:<p>För mer valmöjligheter finns det instruktioner för att installera på flera olika Unixdistributioner på Gits hemsida, <a href="http://git-scm.com/download/linux" class="bare">http://git-scm.com/download/linux</a>.</p>
2025-02-26T08:33:19.4231300Z public/book/sv/v2/Kom-igång-Installera-Git.html:7602:En version av Git för macOS tillhandahålls på Gits hemsida, <a href="http://git-scm.com/download/mac" class="bare">http://git-scm.com/download/mac</a>.</p>
2025-02-26T08:33:19.4232751Z public/book/sv/v2/Kom-igång-Installera-Git.html:7621:Gå bara till <a href="http://git-scm.com/download/win" class="bare">http://git-scm.com/download/win</a> och nedladdningen startar automatiskt.
2025-02-26T08:33:19.4233966Z public/book/zh/v2/自定义-Git-配置-Git.html:7611:你也可以在 <a href="http://git-scm.com/docs/git-config" class="bare">http://git-scm.com/docs/git-config</a> 找到同样的内容。</p>
2025-02-26T08:33:19.4234868Z public/docs/gitweb.conf/2.3.10.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4235894Z public/docs/gitweb.conf/2.4.12.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4236770Z public/docs/gitweb.conf/2.9.5.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4237628Z public/docs/gitweb.conf/2.0.5.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4238464Z public/docs/gitweb.conf/2.5.6.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4239314Z public/docs/gitweb.conf/2.11.4.html:2253:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed
2025-02-26T08:33:19.4240154Z public/docs/gitweb.conf/2.1.4.html:2246:refer to Git homepage, <a href="http://git-scm.com" class="bare">http://git-scm.com</a>; in the past, they pointed

These are outside of our control, though, see e.g. the first hit and the second hit.

It's a bit disappointing that these slipped through the cracks in the PR build, which passed without flagging anything.

dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
The new checks for HTTPS enforcement found a couple of problems:
git#1953 (comment)

Essentially, some (quite stale) translations of the ProGit book, as well
as manual pages of older Git versions, use http://git-scm.com links. And
those are basically outside of our control to fix properly (in
particular the manual pages of older Git versions).

So let's just work around this by manually replacing them.

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
After merging git#1953, as per
https://github.com/git/git-scm.com/actions/runs/13539600621/job/37837557415#step:3:135167
the `deploy` workflow failed.

This issue should have been found in a PR build, but was not. Let's make
sure that similar issues will be found early in the future, before
merging the respective PR.

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
The new checks for HTTPS enforcement found a couple of problems:
git#1953 (comment)

Essentially, some (quite stale) translations of the ProGit book, as well
as manual pages of older Git versions, use http://git-scm.com links. And
those are basically outside of our control to fix properly (in
particular the manual pages of older Git versions).

So let's just work around this by manually replacing them.

Signed-off-by: Johannes Schindelin <[email protected]>
@dscho dscho mentioned this pull request Feb 26, 2025
@dscho
Copy link
Member

dscho commented Feb 26, 2025

@b9a1 I've fixed these issues in #1957, please review.

Another riddle (one which I was not able to solve): When I run curl -s https://git-scm.com/application.min.css | tr '()' '\n' | grep -c ^http:, I get 157 hits, and when I run the same with https: instead, I get 0 hits. In other words, the application.min.css file still has non-HTTPS links! However, the deployment should have been successful and when I download the github-pages artifact from https://github.com/git/git-scm.com/actions/runs/13539600621, its artifacts.tar contains an ./application.min.css that does not contain any HTTP links. I'm quite puzzled.

@b9a1
Copy link
Contributor Author

b9a1 commented Feb 26, 2025

It's a bit disappointing that these slipped through the cracks in the PR build, which passed without flagging anything.

That was my bad. Thanks a lot for fixing this, and my sincere apologies for the inconvenience.

Another riddle (one which I was not able to solve): When I run curl -s https://git-scm.com/application.min.css | tr '()' '\n' | grep -c ^http:, I get 157 hits, and when I run the same with https: instead, I get 0 hits. In other words, the application.min.css file still has non-HTTPS links!

Seems like Cloudflare caches to me. I have the expected 157 hits for https: when I add --insecure --resolve git-scm.com:443:185.199.108.153 to curl.

@dscho
Copy link
Member

dscho commented Feb 26, 2025

It's a bit disappointing that these slipped through the cracks in the PR build, which passed without flagging anything.

That was my bad. Thanks a lot for fixing this, and my sincere apologies for the inconvenience.

Oh, I did not mean to criticize you @b9a1! Sorry if I came over like that.

Another riddle (one which I was not able to solve): When I run curl -s https://git-scm.com/application.min.css | tr '()' '\n' | grep -c ^http:, I get 157 hits, and when I run the same with https: instead, I get 0 hits. In other words, the application.min.css file still has non-HTTPS links!

Seems like Cloudflare caches to me. I have the expected 157 hits for https: when I add --insecure --resolve git-scm.com:443:185.199.108.153 to curl.

Good point. We do have code to drop Cloudflare's caches, but apparently it does not do what it is supposed to do.

dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
There is specific code in git-scm.com's deploy workflow to open a ticket
whenever broken links were detected, and to close such a ticket when no
broken links were detected.

However, as per lycheeverse/lychee-action#265
the way we checked for this was incorrect: `env.lychee_exit_code` had
was correct, until lycheeverse/lychee-action#245
broke it by way of fixing another bug.

This was the reason why the broken link that was found and reported in
https://github.com/git/git-scm.com/actions/runs/13544529063/job/37852881418#step:3:135319
never made it into a GitHub issue, even if that had been the intention.

For the record, I worked on a fix for this broken link and opened
jnavila/git-manpages-l10n#131 to incorporate
that fix.

What prevented this broken link from being detected before
above-mentioned deployment is the fact that before
git#1953 was merged, the
`git-scm.com` deployment used `http://` in the base URL, and hence the
`--remap` option used in the deployment workflow mapped all
http://git-scm.com links to local files, whereas now the `https://` base
URL is used and https://git-scm.com links are mapped, including the
offending one.

In any case let's fix opening/closing the "broken link" issues.

Signed-off-by: Johannes Schindelin <[email protected]>
dscho added a commit to dscho/git-scm.com that referenced this pull request Feb 26, 2025
There is specific code in git-scm.com's deploy workflow to open a ticket
whenever broken links were detected, and to close such a ticket when no
broken links were detected.

However, as per lycheeverse/lychee-action#265
the way we checked for this was incorrect: `env.lychee_exit_code` had
was correct, until lycheeverse/lychee-action#245
broke it by way of fixing another bug.

This was the reason why the broken link that was found and reported in
https://github.com/git/git-scm.com/actions/runs/13544529063/job/37852881418#step:3:135319
never made it into a GitHub issue, even if that had been the intention.

For the record, I worked on a fix for this broken link and opened
jnavila/git-manpages-l10n#131 to incorporate
that fix.

What prevented this broken link from being detected before
above-mentioned deployment is the fact that before
git#1953 was merged, the
`git-scm.com` deployment used `http://` in the base URL, and hence the
`--remap` option used in the deployment workflow mapped all
http://git-scm.com links to local files, whereas now the `https://` base
URL is used and https://git-scm.com links are mapped, including the
offending one.

In any case let's fix opening/closing the "broken link" issues.

Signed-off-by: Johannes Schindelin <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants