npm/yarn超时,带包装上的git:// url
我的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 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
对于当前遇到相同错误的人,请尝试以下操作:
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