这是月全食的堆栈跟踪
org.eclipse.jgit.api.errors.TransportException: https://gitlab.com/reddognetworks/mutts.git: Secure connection to https://gitlab.com/reddognetworks/mutts.git could not be established because of SSL problems
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:192)
at org.eclipse.jgit.api.LsRemoteCommand.call(LsRemoteCommand.java:131)
at org.eclipse.egit.core.op.ListRemoteOperation.run(ListRemoteOperation.java:116)
at org.eclipse.egit.ui.internal.clone.SourceBranchPage$9.run(SourceBranchPage.java:377)
at org.eclipse.jface.operation.ModalContext$ModalContextThread.run(ModalContext.java:122)
Caused by: org.eclipse.jgit.errors.TransportException: https://gitlab.com/reddognetworks/mutts.git: Secure connection to https://gitlab.com/reddognetworks/mutts.git could not be established because of SSL problems
at org.eclipse.jgit.transport.TransportHttp.handleSslFailure(TransportHttp.java:831)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:732)
at org.eclipse.jgit.transport.TransportHttp.openFetch(TransportHttp.java:465)
at org.eclipse.jgit.api.LsRemoteCommand.execute(LsRemoteCommand.java:170)
... 4 more
Caused by: javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:128)
at java.base/sun.security.ssl.Alert.createSSLException(Alert.java:117)
at java.base/sun.security.ssl.TransportContext.fatal(TransportContext.java:308)
at java.base/sun.security.ssl.Alert$AlertConsumer.consume(Alert.java:279)
at java.base/sun.security.ssl.TransportContext.dispatch(TransportContext.java:181)
at java.base/sun.security.ssl.SSLTransport.decode(SSLTransport.java:164)
at java.base/sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1152)
at java.base/sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1063)
at java.base/sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:436)
at org.apache.http.conn.ssl.SSLConnectionSocketFactory.connectSocket(SSLConnectionSocketFactory.java:384)
at org.apache.http.impl.conn.DefaultHttpClientConnectionOperator.connect(DefaultHttpClientConnectionOperator.java:142)
at org.apache.http.impl.conn.BasicHttpClientConnectionManager.connect(BasicHttpClientConnectionManager.java:313)
at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:393)
at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:236)
at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:186)
at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:89)
at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:110)
at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:185)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:83)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:108)
at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:56)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.execute(HttpClientConnection.java:274)
at org.eclipse.jgit.transport.http.apache.HttpClientConnection.getResponseCode(HttpClientConnection.java:251)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:205)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:654)
... 6 more
我正在使用eclipse 2022.06和eclipse 6.0.0的Git集成(egit)我看到了握手错误消息的其他问题,但它们是多年前的问题,而且是在Java 7上。
eclipse.buildId=4.24.0.I20220607-0700
java.version=11
java.vendor=Oracle Corporation
BootLoader constants: OS=win32, ARCH=x86_64, WS=win32, NL=en_US
Framework arguments: -product org.eclipse.epp.package.jee.product
Command-line arguments: -os win32 -ws win32 -arch x86_64 -product org.eclipse.epp.package.jee.product
- 我已经尝试设置http.sslVerify=false。
- 我还尝试在eclipse首选项中更改HTTP客户机和SSL代理|git,这并没有帮助。
- 命令行git到gitlab将工作
- 使用egit到github也可以,但不能到gitlab
- 我最后一次通过egit成功连接到gitlab是在我升级到eclipse 2022.06之前
1条答案
按热度按时间mxg2im7a1#
我找到了我的答案。我把eclipse改成使用jdk 11而不是它附带的jre 17。当我把eclipse改回使用jdk 17时,它又工作了。gitlab的git repo一定有什么问题,它的SSL要求需要更高的java版本。