npm/yarn超时,带包装上的git:// url

发布于 2025-02-02 20:09:14 字数 928 浏览 1 评论 0原文

我的Angular应用不会构建。它曾经。
我的工作站已更新为POP OS 22.04。 POP OS 21.10上的另一台机器还可以。 IM从NPM收到以下错误:

6284 verbose node v14.19.3
6285 verbose npm  v6.14.17
6286 error Error while executing:
6286 error /usr/bin/git ls-remote -h -t git://github.com/timaschew/cogent.git
6286 error
6286 error fatal: unable to connect to github.com:
6286 error github.com[0: 52.64.108.95]: errno=Connection timed out
6286 error
6286 error
6286 error exited with error code: 128

此日志来自我在工作站上运行的构建代理。

直接使用纱线,我得到类似的响应:

[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/timaschew/cogent
Directory: /mnt/win/dev/xxx/src/xxx.Client
Output:
fatal: unable to connect to github.com:
github.com[0: 52.64.108.95]: errno=Connection timed out

我无法直接运行该Git LS-Remote命令,但是如果我将其切换到HTTPS,则可以正常运行。这是我的软件包中唯一使用git的lock文件的组件://

My Angular app wont build. It used to.
My workstation was updated to Pop OS 22.04. Another machine on Pop OS 21.10 is ok.
Im getting the following error from npm:

6284 verbose node v14.19.3
6285 verbose npm  v6.14.17
6286 error Error while executing:
6286 error /usr/bin/git ls-remote -h -t git://github.com/timaschew/cogent.git
6286 error
6286 error fatal: unable to connect to github.com:
6286 error github.com[0: 52.64.108.95]: errno=Connection timed out
6286 error
6286 error
6286 error exited with error code: 128

This log is from my build agent running on my workstation.

Using yarn directly I get a similar response:

[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
Arguments: ls-remote --tags --heads git://github.com/timaschew/cogent
Directory: /mnt/win/dev/xxx/src/xxx.Client
Output:
fatal: unable to connect to github.com:
github.com[0: 52.64.108.95]: errno=Connection timed out

I cant run that git ls-remote command directly either but if I switch it to https it works ok. This is the only component in my package.lock file using git://

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

爱的故事 2025-02-09 20:09:14

对于当前遇到相同错误的人,请尝试以下操作:

git config - global URL。

管道,可能有必要在package-lock.json文件中手动进行更改。

参考:此页面

For those currently experiencing the same error, please try this:

git config --global url."https://".insteadOf git://

And if you are working with some sort of CI/CD pipeline, it might be necessary to make the change manually in the package-lock.json file.

Ref: This page

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文