git clone 出现fatal: unable to access ‘https://github 类错误解决方法

git clone 遇到问题:

[root@localhost opt]# git clone --depth=1 https://github.com/jumpserver/setuptools.git

①Cloning into ‘setuptools’…
fatal: unable to access ‘https://github.com/jumpserver/setuptools.git/’: Encountered end of file

②Cloning into ‘setuptools’…
fatal: unable to access ‘https://github.com/jumpserver/setuptools.git/’: TCP connection reset by peer

解决办法:将命令行里的http改为git重新执行

[root@localhost opt]# git clone --depth=1 git://github.com/jumpserver/setuptools.git
Cloning into 'setuptools'...
remote: Enumerating objects: 37, done.
remote: Counting objects: 100% (37/37), done.
remote: Compressing objects: 100% (34/34), done.
remote: Total 37 (delta 5), reused 10 (delta 0), pack-reused 0
Receiving objects:  70% (26/37), 148.00 KiBReceiving objects:  72% (27/37), 148.00 KiBReceiving objects:  75% (28/37), 148.00 KiBReceiving objects:  78% (29/37), 148.00 KiBReceiving objects:  81% (30/37), 148.00 KiBReceiving objects:  83% (31/37), 148.00 KiBReceiving objects:  86% (32/37), 148.00 KiBReceiving objects:  89% (33/37), 148.00 KiBReceiving objects:  91% (34/37), 148.00 KiBReceiving objects:  94% (35/37), 148.00 KiBReceiving objects:  97% (36/37), 148.00 KiBReceiving objects: 100% (37/37), 148.00 KiBReceiving objects: 100% (37/37), 784.52 KiB | 274.00 KiB/s, done.
Resolving deltas: 100% (5/5), done.
 

总结:git clone 遇到问题:fatal: unable to access 'https://github.comxxxxxxxxxxx': Failed to connect to xxxxxxxxxxxxx
将命令行里的http改为git重新执行即可

你可能感兴趣的:(git clone 出现fatal: unable to access ‘https://github 类错误解决方法)