下载Android源码,提示:fatal: unable to access 'https://gerrit.googlesource.com/git-repo/': Failed to connec

记一次Android源码下载遇到的坑

注:这里的网络都是科学上网后的

按照Android官网源码下载(需要科学上网访问)进行操作时,执行到如下命令

repo init -u https://android.googlesource.com/platform/manifest

出现如下错误:

fatal: unable to access 'https://gerrit.googlesource.com/git-repo/':
Failed to connect to gerrit.googlesource.com port 443: Operation timed out

解决办法:
给git设置代理模式

git config --global http.proxy 127.0.0.1:1087

这里需要注意一点,就是 127.0.0.1:1087不同vpn时不一样的,要设置成使用vpn的的代理才可以

可参考这篇文章

使用git bash下载Android源码Failed to connect to android.googlesource.com port 443: Timed out的问题解决方法

猜你喜欢

转载自blog.csdn.net/qq_34696209/article/details/88591735