gpt4 book ai didi

由于更改公司代理证书导致 Git 推送失败

转载 作者:太空狗 更新时间:2023-10-29 14:20:38 25 4
gpt4 key购买 nike

最近,公司代理的证书发生了变化。从那以后,我就一直面临着使用 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,但他们坚持我/strong> HTTPS。

我有一个 .cer 证书文件,我被要求在我的 Ubuntu 桌面 (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

最佳答案

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

您可以尝试将您拥有的证书文件复制到 /etc/ssl/certs/ 下,然后输入命令 c_rehash .(注意圆点!)在该目录中,作为 root 用户。

关于由于更改公司代理证书导致 Git 推送失败,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13027876/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com