通过 gerrit-review.googlesource.com 克隆gerrit项目的gerrit仓库时报错:
fatal: unable to access 'https://gerrit-review.googlesource.com/gerrit/': Failed to connect to gerrit-review.googlesource.com port 443 after 21073 ms: Couldn't connect to server
解决方案1:通过中科大开源镜像访问
比如gerrit项目就可以使用这个方法:
git clone https://gerrit-googlesource.lug.ustc.edu.cn/gerrit
解决方案2:给git设置代理
(1)打开浏览器,访问 chrome://settings/
。
(2)搜索 代理,点击 打开计算机的代理设置。
(3)检查代理服务器的地址和端口号。
(4)给git设置代理(记得换成自己的端口号才有效)
git config --global http.proxy "localhost:[代理的端口号]"
例如
git config --global http.proxy "localhost:19999"
取消git代理:
git config --global --unset http.proxy