eclipse Gitlab 无法打开 git-upload-pack 错误
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/26066993/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Gitlab cannot open git-upload-pack error
提问by Laurent Le Moux
I have been using Gitlab without problems for a couple of months now. But, since yesterday, I can not "reach" (fetch, push,...) Gitlab from my Eclipse IDE anymore.
几个月来,我一直在使用 Gitlab 没有问题。但是,从昨天开始,我再也无法从 Eclipse IDE 中“访问”(获取、推送……)Gitlab。
No matter whether I'm working in my firm (could have been a proxy problem) or at home.
无论我是在我的公司工作(可能是代理问题)还是在家里。
I get the following error message :
我收到以下错误消息:
https://gitlab.com/XXX/XXX.git:
cannot open git-upload-pack
cannot open git-upload-pack
Looking at my Eclipse .log
, the cause is :
看看我的 Eclipse .log
,原因是:
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.Alerts.getSSLException(Unknown Source)
at sun.security.ssl.SSLSocketImpl.recvAlert(Unknown Source)
at sun.security.ssl.SSLSocketImpl.readRecord(Unknown Source)
at sun.security.ssl.SSLSocketImpl.performInitialHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.security.ssl.SSLSocketImpl.startHandshake(Unknown Source)
at sun.net.www.protocol.https.HttpsClient.afterConnect(Unknown Source)
at sun.net.www.protocol.https.AbstractDelegateHttpsURLConnection.connect(Unknown Source)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(Unknown Source)
at java.net.HttpURLConnection.getResponseCode(Unknown Source)
at sun.net.www.protocol.https.HttpsURLConnectionImpl.getResponseCode(Unknown Source)
at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:98)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:168)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:460)
... 10 more
Adding http.sslVerify=false
in my Eclipse/Git configuration did not help...
添加http.sslVerify=false
我的 Eclipse/Git 配置没有帮助...
Any idea why this is (suddenly) happening?
知道为什么会(突然)发生这种情况吗?
回答by jgibson
I've encountered a similar error with another Gitlab server. I dug into it and discovered that all of the available ciphers on the server were at least 256 bits. Standard Oracle Java ships with crypto that's restricted to 128 bits for some algorithms. After installing the unlimited strength crypto packagefrom Oracle the issue went away.
我在另一个 Gitlab 服务器上遇到了类似的错误。我深入研究并发现服务器上所有可用的密码至少为 256 位。标准 Oracle Java 附带加密,某些算法限制为 128 位。从 Oracle安装无限强度加密包后,问题就消失了。
Almost forgot, the unlimited strength package is only legally available in the US. If you're outside of the US then I think that OpenJDK will work instead.
差点忘了,无限力量套餐只在美国合法使用。如果您不在美国,那么我认为 OpenJDK 会起作用。
回答by Olivier.Roger
As explained by @jgibson this seems related to the crypto algorithms
正如@jgibson 所解释的,这似乎与加密算法有关
I did not try the unlimited strength crypto package but running Eclipse with Java 8.0.25solved the issue for me.
我没有尝试无限强度的加密包,但使用 Java 8.0.25运行 Eclipse为我解决了这个问题。
回答by Jeryl Cook
Ahh had this issue simply do this:
啊有这个问题,只需这样做:
in eclipse, go to Windows->Prefrences->General->Network Connections->SSH
在 Eclipse 中,转到 Windows->Preferences->General->Network Connections->SSH
- Click tab "Key management"
- Click generate RSA key.
- Click Apply -copy and paste everything in the box "sha-rsa ..." into gitlab->profilie-add SSH key
- 单击选项卡“密钥管理”
- 单击生成 RSA 密钥。
- 单击 Apply -copy 并将“sha-rsa ...”框中的所有内容粘贴到 gitlab->profilie-add SSH 密钥中
attempt clone again via ssh.
再次尝试通过 ssh 克隆。
回答by user3623183
For me didn't help the prior posts, but i was able to fix this by changing the security options of Java. Under system settings you can find a "Java Control Panel" where the tab "Security" let you change the security level.
对我来说对之前的帖子没有帮助,但我能够通过更改 Java 的安全选项来解决这个问题。在系统设置下,您可以找到“Java 控制面板”,其中的“安全”选项卡可让您更改安全级别。
Dependent on the version you use, you see different options. It worked for me , after setting this to "low". But on different systems you might only have "high" / "very high" options. It depends on the installed Java versions.
根据您使用的版本,您会看到不同的选项。在将其设置为“低”后,它对我有用。但是在不同的系统上,您可能只有“高”/“非常高”选项。这取决于安装的 Java 版本。
回答by Mateen
i got the same error when github was down, this was due to the proxy settings of our network admin, i then again connected with another internet provider github was working fine
我在 github 关闭时遇到了同样的错误,这是由于我们网络管理员的代理设置,然后我再次连接到另一个互联网提供商 github 工作正常
this solved my problem
这解决了我的问题
EGit: cannot push, cannot pull
- changed the origin to my fork account and pulled.
- changed the origin back to the actual value and pulled.
- 将原点更改为我的分叉帐户并拉取。
- 将原点改回实际值并拉动。
回答by Xantopp
I had the problem as well (cloning a git-repository), but using an old eclipse JUNO (32-Bit). The suggested solutions (-Dhttps.protocols=TLSv1.1,TLSv1.2, ssalVerify=false
) did not change anything.
我也有这个问题(克隆一个 git 存储库),但使用的是旧的 eclipse JUNO(32 位)。建议的解决方案 ( -Dhttps.protocols=TLSv1.1,TLSv1.2, ssalVerify=false
) 没有改变任何东西。
Finally I learned that I had to select "git:\\"as 'Protocol'in the Dialog "File->Import... Git, Projrects from git... URL..."
最后我了解到我必须在对话框 “File->Import... Git, Projrects from git... URL...”中选择“git:\\”作为“Protocol ”
I with the actual (18.9) Version of eclipse I could use the http-ULR as is.
我使用实际的 (18.9) 版本的 eclipse 我可以按原样使用 http-ULR。