OPTEE repo更新提示“Failed to connect to boringssl.googlesource.com port 443: Connection timed out”的解决方案

问题现象

参考OPTEE官方指导下载OPTEE QEMU v8对应repo时提示“Failed to connect to boringssl.googlesource.com port 443: Connection timed out”,如下

$repo sync -j4
Fetching: 85% (24/28) OP-TEE/optee_client.git
fatal: unable to access 'https://boringssl.googlesource.com/boringssl/': Failed to connect to boringssl.googlesource.com port 443: Connection timed out

tianocore/edk2.git/CryptoPkg/Library/OpensslLib/openssl/boringssl:
fatal: unable to access 'https://boringssl.googlesource.com/boringssl/': Failed to connect to boringssl.googlesource.com port 443: Connection timed out
tianocore/edk2.git/CryptoPkg/Library/OpensslLib/openssl/boringssl: sleeping 4.0 seconds before retrying
fatal: unable to access 'https://boringssl.googlesource.com/boringssl/': Failed to connect to boringssl.googlesource.com port 443: Connection timed out

tianocore/edk2.git/CryptoPkg/Library/OpensslLib/openssl/boringssl:
fatal: unable to access 'https://boringssl.googlesource.com/boringssl/': Failed to connect to boringssl.googlesource.com port 443: Connection timed out
error: Cannot fetch tianocore/edk2.git/CryptoPkg/Library/OpensslLib/openssl/boringssl from https://boringssl.googlesource.com/boringssl
Fetching: 100% (28/28), done in 4m36.202s
G

问题原因

optee的qemu-v8分支会自动下载edk2,而edk2的Openssl在下载boringssl时访问boringssl.googlesource.com,而GFW屏蔽了googlesouce,所以会导致链接超时

解决方案

解决思路是使用git config --global url.A.insteadOf B命令将boringssl.googlesource.com替换为谷歌的github镜像库https://github.com/google/boringssl.git,方法如下:

  1. 执行如下命令
git config --global url."https://github.com/google/boringssl.git".insteadOf "https://boringssl.googlesource.com/boringssl"

2.如果github下载速度过慢,则可以使用hub.fastgit.org加速,启用加速的命令如下

git config --global url."https://hub.fastgit.org/google/boringssl.git".insteadOf "https://boringssl.googlesource.com/boringssl"
  1. 重新执行repo sync即可

结果Log

xxx@LISS:~/optee
$git config --global url."https://hub.fastgit.org/google/boringssl.git".insteadOf "https://boringssl.googlesource.com/boringssl"
xxx@LISS:~/optee
$repo syncFetching: 100% (28/28), done in 1m25.215sGarbage collecting: 46% (13/28) tianocore/edk2.git/MdeModulePkg/Library/BrotliCustomDecompressLib/brotli/research/libdivsGarbage collecting: 100% (28/28), done in 0.072s
Checking out: 100% (28/28), done in 0.715s
repo sync has finished successfully.

参考链接

FastGit官方使用说明

  • 3
    点赞
  • 7
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
在遇到"Failed to connect to github.com port 443 after xxx ms: Timed out"错误时,可能是由于网络连接问题导致的。以下是一些可能的解决办法: 1. 检查网络连接:确保你的网络连接正常,可以尝试访问其他网站来确认网络是否正常工作。 2. 检查防火墙设置:如果你使用防火墙,请确保允许git通过防火墙进行网络连接。你可以尝试禁用防火墙或者添加git到防火墙的白名单中。 3. 检查代理设置:如果你使用代理服务器进行网络连接,请确保你的git配置正确地指向了代理服务器。你可以使用以下命令检查和修改git的代理设置: ```shell # 查看当前代理设置 git config --global --get http.proxy git config --global --get https.proxy # 设置代理 git config --global http.proxy http://proxy.example.com:8888 git config --global https.proxy https://proxy.example.com:8888 # 取消代理设置 git config --global --unset http.proxy git config --global --unset https.proxy ``` 4. 尝试使用SSH协议:如果你使用的是HTTPS协议进行git操作,可以尝试使用SSH协议来连接github。首先,你需要生成SSH密钥并将公钥添加到你的github账户中。然后,你可以使用SSH URL来进行git操作,例如: ```shell git clone git@github.com:username/repo.git ``` 5. 尝试更改git的配置:有时候,更改git的一些配置选项也可以解决连接超时的问题。你可以尝试执行以下命令来更改git的配置: ```shell # 设置git的超时时间为60秒 git config --global http.lowSpeedLimit 60 git config --global http.lowSpeedTime 60 ``` 请注意,以上解决办法仅供参考,具体的解决方法可能因个人情况而异。如果问题仍然存在,请尝试联系网络管理员或者咨询github的支持团队以获取更多帮助。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值