2012-10-23 53 views
3

最近,公司代理的證書已更改。從那以後,我一直在使用git遇到問題。當我嘗試做一個git push,我得到以下錯誤:由於公司代理證書更改導致Git推送失敗

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。

我有一個.cer證書文件,我被要求在我的Ubuntu桌面(Ubuntu 12.04)中安裝系統,但我一直沒有找到辦法做到這一點。請幫忙 !

這裏是捲曲日誌我進行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 

回答

1

你的連接使用/etc/ssl/certs/cert.crt作爲證書。

您可以嘗試複製您擁有的證書文件/etc/ssl/certs/,然後以root用戶的身份在該目錄內輸入命令c_rehash .(注意點!)。

相關問題