Git 同步代码两例常见报错

目录

1. GnuTLS recv error (-54): Error in the pull function.

2. gnutls_handshake() failed: The TLS connection was non-properly terminated.

1. GnuTLS recv error (-54): Error in the pull function.

今天如下命令同步某个工程代码:

git clone https://liuzhen007.com/test.git

遇到了下面的报错:

fatal: unable to access 'https://liuzhen007.com/test.git/': GnuTLS recv error (-54): Error in the pull function.

可以不使用https协议,使用git自己的协议同步代码,解决方法如下:

git clone git://liuzhen007.com/test.git

2. gnutls_handshake() failed: The TLS connection was non-properly terminated.

报错截图如下:

大多数情况下,是没有访问国外网站导致的。可以考虑设置代理,具体命令如下,使用 4500 端口为例:

git config --global http.https://github.com.proxy http://127.0.0.1:4500 git config --global https.https://github.com.proxy https://127.0.0.1:4500

另外,取消代理命令也是有必要说一下的:

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

作者简介:

相关文章

学习编程是顺着互联网的发展潮流,是一件好事。新手如何学习...
IT行业是什么工作做什么?IT行业的工作有:产品策划类、页面...
女生学Java好就业吗?女生适合学Java编程吗?目前有不少女生...
Can’t connect to local MySQL server through socket \'/v...
oracle基本命令 一、登录操作 1.管理员登录 # 管理员登录 ...
一、背景 因为项目中需要通北京网络,所以需要连vpn,但是服...