简体   繁体   English

git失败,并显示“ gnutls_handshake()失败”

[英]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.

相关问题 gnutls_handshake() 失败:GIT 握手失败 - gnutls_handshake() failed: Handshake failed GIT git错误:gnutls_handshake()在推送时失败 - git error: gnutls_handshake() failed on push 错误:gnutls_handshake()GIT存储库失败 - error: gnutls_handshake() failed GIT repository git clone:致命:gnutls_handshake()失败了 - git clone: fatal: gnutls_handshake() failed Git 问题:gnutls_handshake() 失败:收到了意外的 TLS 数据包 - Git Problem: gnutls_handshake() failed: An unexpected TLS packet was received Git: gnutls_handshake() failed: 拉函数出错 - Git: gnutls_handshake() failed: Error in the pull function 致命:无法访问“......”:gnutls_handshake()失败:握手失败 - fatal: unable to access ".....": gnutls_handshake() failed: Handshake failed git clone 错误:gnutls_handshake() 失败:收到了意外的 TLS 数据包 - git clone error: gnutls_handshake() failed: An unexpected TLS packet was received Ubuntu git:致命:无法访问 gnutls_handshake() 失败:已收到 TLS 致命警报 - Ubuntu git: fatal: unable to access gnutls_handshake() failed: A TLS fatal alert has been received “gnutls_handshake()失败():一个意外长度的TLS数据包”在学校收到“ - “gnutls_handshake() failed(): A TLS packet with unexpected length was receive” at school
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM