解决fatal: unable to connect to github.com及其后问题

命令:git clone git://github.com/xxxx
错误信息:
fatal: unable to connect to github.com:
github.com[0: 你的IP]: errno=Operation timed out
原因:
需要用https才能读到数据
解决方法:输入命令

git config --global url."https://github.com".insteadOf git://github.com

如果再次git clone出现报错:
fatal: unable to access ‘https://github.com/robbyrussell/oh-my-zsh.git/’: LibreSSL SSL_connect: SSL_ERROR_SYSCALL in connection to github.com:443

输入命令:

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

华为开发者空间,是为全球开发者打造的专属开发空间,汇聚了华为优质开发资源及工具,致力于让每一位开发者拥有一台云主机,基于华为根生态开发、创新。

更多推荐