1

Yesterday I have set up a new server from a fresh Ubuntu 12.04 LTS image. I installed git-core in version 1.7.9.5. 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?

4

1 回答 1

0

您将要检查您的 .git/config 文件,并确保 github 有您的公共 ssh 密钥(位于 ~/.ssh/id_rsa.pub 或 ~/.ssh/id_dsa.pub)。我的 .git/config 文件如下所示(用户名和 repo 应该与您相关):

[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
于 2013-11-26T02:25:01.820 回答