LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 解决方案

在国内,从github克隆代码,总会遇到这个的问题:LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

谷歌了半天,找到了一个简单有效的解决方式:通过ssh进行克隆(默认情况下,使用的是HTTPS进行的克隆)

1. How to create SSH -> About SSH - GitHub Docs

2. 在github的clone按钮中,使用ssh的链接进行git clone

但是,我在clone grpc的过程中,加了submodule选项,在clone submodule的时候,切换成了HTTPS的方式,又出了443报错,为了解决这个问题,可以通过如下的方式,重写.gitmodules文件:

perl -i -p -e's|https://(.*?)/|git@\1:|g'.gitmodules


Reference: 1. Git - SSL_ERROR_SYSCALL 问题解决 | Hyperzsb’s Ideas

                   2. One-liner to replace HTTPS into SSH url in .gitmodules (dhoeric.github.io)

你可能感兴趣的:(LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443 解决方案)