最近,公司代理的证书被更改了。从那时起,我在使用git时遇到了问题。当我尝试执行git 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推送或通过执行git config --global http.sslVerify false
关闭sslVerify来切换,但他们坚持要我仅使用HTTPS。
他们要求我在Ubuntu桌面系统范围内安装一个.cer证书文件(Ubuntu 12.04),但是我一直没有找到方法。请帮忙!
这是我执行export GIT_CURL_VERBOSE=1
后获得的curl日志:
* 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