[英]git fails with “gnutls_handshake() failed”
Yesterday I have set up a new server from a fresh Ubuntu 12.04 LTS image. 昨天,我从新的Ubuntu 12.04 LTS映像中设置了新服务器。 I installed git-core in version 1.7.9.5.
我在1.7.9.5版中安装了git-core。 Now I get the following error by trying to clone an existing repository:
现在,我通过尝试克隆现有存储库而收到以下错误:
error: gnutls_handshake() failed: An unexpected TLS packet was received. while accessing https://github.com/***/***/info/refs
fatal: HTTP request failed
I have read that the reason can be a wrong certificate but how can this happen when I am directly connected to the internet without any firewall/proxy? 我已经读过原因可能是证书错误,但是当我没有任何防火墙/代理服务器直接连接到互联网时怎么办?
You're going to want to check your .git/config file, and make sure that github has your public ssh key (located at ~/.ssh/id_rsa.pub or ~/.ssh/id_dsa.pub). 您将要检查.git / config文件,并确保github具有您的公共ssh密钥(位于〜/ .ssh / id_rsa.pub或〜/ .ssh / id_dsa.pub)。 My .git/config file is shown below (username and repo should by relevant to you):
我的.git / config文件如下所示(用户名和存储库应与您相关):
[core]
repositoryformatversion = 0
filemode = true
logallrefupdates = true
[remote "origin"]
url = https://github.com/username/repo.git
fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
remote = origin
merge = refs/heads/master
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.