Git:Failed to connect to chromium.googlesource.com port 443 after 21081 ms: Timed out

ChatGPT 3.5 国内中文镜像站免费使用啦

一.git clone 超时

连接 vpn,网页上可以直接打开网站,但是使用 terminal 执行 git clone,提示 Timed out ,如下所示:

e:\work>git clone https://chromium.googlesource.com/chromium/tools/depot_tools
Cloning into 'depot_tools'...
fatal: unable to access 'https://chromium.googlesource.com/chromium/tools/depot_tools/': Failed to connect to chromium.googlesource.com port 443 after 21081 ms: Timed out

二.git clone 超时解决办法

使用 git clone 提示 Timed out ,可以通过设置  http.proxy 完成,如下:

git config —global http.proxy socks5://127.0.0.1:xxxxx
git config —global https.proxy socks5://127.0.0.1:xxxxx

xxxxx 是端口号,根据不同的 vpn 不一样,我这里使用的是 lartern ,端口是50321

e:\work>git config --global http.proxy "localhost:50321"

e:\work>git clone https://chromium.googlesource.com/chromium/tools/depot_tools
Cloning into 'depot_tools'...
remote: Total 50638 (delta 34045), reused 50638 (delta 34045)
Receiving objects: 100% (50638/50638), 44.89 MiB | 7.21 MiB/s, done.
Resolving deltas: 100% (34045/34045), done.

三.git 取消代理

git config --global --unset http.proxy
git config --global --unset https.proxy

ChatGPT 3.5 国内中文镜像站免费使用啦
文章版权声明 1、本网站名称:猿说编程
2、本站永久网址:https://www.codersrc.com
3、本网站的文章部分内容可能来源于网络,仅供大家学习与参考,如有侵权,请联系站长进行删除处理。
4、本站一切资源不代表本站立场,并不代表本站赞同其观点和对其真实性负责。
5、本站一律禁止以任何方式发布或转载任何违法的相关信息,访客发现请向站长举报
6、本站资源大多存储在云盘,如发现链接失效,请联系我们我们会第一时间更新。

© 版权声明
THE END
喜欢就支持一下吧
点赞0 分享
评论 抢沙发

请登录后发表评论

    暂无评论内容