告诉HN:在你的项目中搜索“git://github.com”。任何匹配项都是一个bug。
如今,许多开源项目在文档、代码注释或元数据中包含如下的仓库 URL:<p><pre><code> git://github.com/debug-js/debug.git
</code></pre>
这些 URL 已经失效。“git://” <i>确实</i> 是一种真实的协议,但在 2022 年,GitHub 停止了对该协议的支持[1],因此任何声称使用该协议的 GitHub 仓库 URL 都是无效的。<p>尽管如此,这种情况仍然相当普遍。在下载量排名前 200 的 npm 包中,有 25 个在其 package.json 文件的“repository”字段中包含这样的 URL。<p>如果大家能修复这些失效的 URL(只需将“git://”替换为“https://”即可),那就太好了。这些 URL 对于不熟悉 git 协议或 GitHub 禁用该协议的读者来说,容易造成困惑。<p>[1] https://github.blog/security/application-security/improving-git-protocol-security-github/#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://github.com/debug-js/debug.git
</code></pre>
These URLs are broken. "git://" <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 "repository" 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 "git://" with "https://"). They are confusing to readers who don't know about the git protocol or GitHub disabling it.<p>[1] https://github.blog/security/application-security/improving-git-protocol-security-github/#no-more-unauthenticated-git