告诉HN:在你的项目中搜索“git://github.com”。任何匹配项都是一个bug。

1作者: XCabbage大约 1 个月前原帖
如今,许多开源项目在文档、代码注释或元数据中包含如下的仓库 URL:<p><pre><code> git:&#x2F;&#x2F;github.com&#x2F;debug-js&#x2F;debug.git </code></pre> 这些 URL 已经失效。“git:&#x2F;&#x2F;” <i>确实</i> 是一种真实的协议,但在 2022 年,GitHub 停止了对该协议的支持[1],因此任何声称使用该协议的 GitHub 仓库 URL 都是无效的。<p>尽管如此,这种情况仍然相当普遍。在下载量排名前 200 的 npm 包中,有 25 个在其 package.json 文件的“repository”字段中包含这样的 URL。<p>如果大家能修复这些失效的 URL(只需将“git:&#x2F;&#x2F;”替换为“https:&#x2F;&#x2F;”即可),那就太好了。这些 URL 对于不熟悉 git 协议或 GitHub 禁用该协议的读者来说,容易造成困惑。<p>[1] https:&#x2F;&#x2F;github.blog&#x2F;security&#x2F;application-security&#x2F;improving-git-protocol-security-github&#x2F;#no-more-unauthenticated-git
查看原文
Lots of open-source projects today contain (usually in docs, code comments, or metadata) repo URLs like this:<p><pre><code> git:&#x2F;&#x2F;github.com&#x2F;debug-js&#x2F;debug.git </code></pre> These URLs are broken. &quot;git:&#x2F;&#x2F;&quot; <i>is</i> a real protocol, but in 2022 GitHub stopped supporting it [1] so any URLs that purport to use the protocol for a GitHub repo are broken.<p>They are still quite common. 25 of the top 200 most-downloaded npm packages have such a URL in the &quot;repository&quot; field of their package.json file.<p>It would be nice if the world would fix these dead URLs (which is easily done by replacing &quot;git:&#x2F;&#x2F;&quot; with &quot;https:&#x2F;&#x2F;&quot;). They are confusing to readers who don&#x27;t know about the git protocol or GitHub disabling it.<p>[1] https:&#x2F;&#x2F;github.blog&#x2F;security&#x2F;application-security&#x2F;improving-git-protocol-security-github&#x2F;#no-more-unauthenticated-git