3

最近,公司代理的证书发生了变化。从那以后,我一直面临使用 git 的问题。当我尝试执行 agit push时,出现以下错误:

error: gnutls_handshake() failed: The Diffie-Hellman prime sent by the server is not acceptable (not long enough). while accessing https://github.com/me/myproj.git/info/refs
fatal: HTTP request failed

我可以切换到使用 HTTP 推送或关闭 sslVerify,git config --global http.sslVerify false但他们坚持我使用HTTPS。

我有一个.cer证书文件,我被要求在我的 Ubuntu 桌面(Ubuntu 12.04)中安装系统范围,但我无法找到一种方法来做到这一点。请帮忙 !

这是我执行后获得的curl日志export GIT_CURL_VERBOSE=1

* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.mycompany.com port 5150 (#0)
*   Trying 10.226.xx.yyy... * Connected to proxy.mycompany.com (10.226.xx.yyy) port 5150 (#0)
* Establish HTTP proxy tunnel to github.com:443
* Proxy auth using Basic with user 'me'
> CONNECT github.com:443 HTTP/1.1
Host: github.com:443
Proxy-Authorization: Basic MjQABCD3Og==
User-Agent: git/1.7.9.5
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.1 200 Connection established
< Date: Tue, 23 Oct 2012 11:45:37 GMT
< Age: 0
< Proxy-Connection: Keep-Alive
< Via: 1.0 MYCOMPANYSERVER.MYCOMPANY.COM
< 
* Proxy replied OK to CONNECT request
* found 1 certificates in /etc/ssl/certs/cert.crt
* gnutls_handshake() failed: The Diffie-Hellman prime sent by the server is not acceptable (not long enough).
* Closing connection #0
* Couldn't find host github.com in the .netrc file; using defaults
* About to connect() to proxy proxy.mycompany.com port 5150 (#0)
*   Trying 10.226.xx.yyy... * Connected to proxy.mycompany.com (10.226.xx.yyy) port 5150 (#0)
* Establish HTTP proxy tunnel to github.com:443
* Proxy auth using Basic with user 'me'
> CONNECT github.com:443 HTTP/1.1
Host: github.com:443
Proxy-Authorization: Basic MjQABCD3Og==
User-Agent: git/1.7.9.5
Proxy-Connection: Keep-Alive
Pragma: no-cache

< HTTP/1.1 200 Connection established
< Date: Tue, 23 Oct 2012 11:45:37 GMT
< Age: 0
< Proxy-Connection: Keep-Alive
< Via: 1.0 MYCOMPANYSERVER.MYCOMPANY.COM
< 
* Proxy replied OK to CONNECT request
* found 1 certificates in /etc/ssl/certs/cert.crt
* gnutls_handshake() failed: The Diffie-Hellman prime sent by the server is not acceptable (not long enough).
* Closing connection #0
error: gnutls_handshake() failed: The Diffie-Hellman prime sent by the server is not acceptable (not long enough). while accessing https://github.com/me/myproject.git/info/refs
fatal: HTTP request failed
4

1 回答 1

1

您的连接/etc/ssl/certs/cert.crt用作证书。

您可以尝试复制您拥有的证书文件,/etc/ssl/certs/然后c_rehash .以 root 用户身份在该目录中发出命令(注意点!)。

于 2013-05-06T04:53:48.667 回答