git gnutls_handshake() 失败:pull 函数出错

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/52379234/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 13:11:23  来源:igfitidea点击:

gnutls_handshake() failed: Error in the pull function

git

提问by Th?o Hoàng Minh

I got the error when using git pullcommand

使用git pull命令时出现错误

fatal: unable to access 'https://github.com/path/to/repo.git/': gnutls_handshake() failed: Error in the pull function.

I try many methods from Internet but they're unuseful. Also, tried to deal with proxy in my network.

我从互联网上尝试了很多方法,但它们都没有用。另外,尝试处理我网络中的代理。

My PC: Ubuntu 16.04 LTS x86_64

我的电脑:Ubuntu 16.04 LTS x86_64

Does it have any effective ways to resolve the problem ?

有没有什么有效的办法来解决这个问题?

Note: There're some solutions https://devopscube.com/gnutls-handshake-failed-aws-codecommit/or https://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting-to-https-serversbut it didn't work in my case.

注意:有一些解决方案https://devopscube.com/gnutls-handshake-failed-aws-codecommit/https://askubuntu.com/questions/186847/error-gnutls-handshake-failed-when-connecting- to-https-servers但它在我的情况下不起作用。

采纳答案by Cristian Sepulveda

My server is behind a proxy and I got the same error, I solved this modifying ~/.gitconfig adding the proxy conf:

我的服务器在代理后面,我遇到了同样的错误,我解决了这个修改 ~/.gitconfig 添加代理配置的问题:

[http]
    proxy = http://xxx.xxx.xxx.xxx:pppp

回答by hardik chugh

I resolved this problem by-

我解决了这个问题 -

 apt-get -y install build-essential nghttp2 libnghttp2-dev libssl-dev