Ubuntu git clone命令报错

执行下面命令行:

git clone https://github.com/XXX 

报错:

Cloning into 'XXX'...
fatal: unable to access 'https://github.com/XXX': gnutls_handshake() failed:The TLS connection was non-properly terminated.

解决办法: 将命令中的https改为git如下:

git clone git://github.com/XXX 

若出现以下错误:

Cloning into 'XXX'...
fatal: unable to connect to github.com:
github.com[0: 20.205.243.166]: errno=Connection timed out

解决办法:输入以下命令

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

再输入以下命令即可!

git clone git://github.com/XXX 
Logo

旨在为数千万中国开发者提供一个无缝且高效的云端环境,以支持学习、使用和贡献开源项目。

更多推荐