简体   繁体   English

SSL error when access gitlab's git thru eclipse "... Secure connection to https://gitlab.com/... could not be established because of SSL problems"

[英]SSL error when access gitlab's git thru eclipse "... Secure connection to https://gitlab.com/... could not be established because of SSL problems"

Here's the full eclipse stacktrace这是完整的 eclipse 堆栈跟踪

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

I'm using eclipse 2022.06 and Git integration for eclipse 6.0.0 (egit) I saw other issues with the handshake error message but they were years old and on Java 7. I'm using I'm using eclipse 2022.06 and Git integration for eclipse 6.0.0 (egit) I saw other issues with the handshake error message but they were years old and on Java 7. I'm using

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
  • I tried setting http.sslVerify=false already.我已经尝试设置 http.sslVerify=false 。
  • I also tried changing the HTTP client and the SSL agent in eclipse preferences |我还尝试在 eclipse 首选项中更改 HTTP 客户端和 SSL 代理 | git and that didn't help. git 并没有帮助。
  • command line git to gitlab will work命令行 git 到 gitlab 将起作用
  • using egit to github will work too, but not to gitlab使用 egit 到 github 也可以,但不适用于 gitlab
  • the last time I connected to gitlab successfully thru egit was before I upgraded to eclipse 2022.06我最后一次通过 egit 成功连接到 gitlab 是在我升级到 eclipse 2022.06 之前

I found my answer.我找到了我的答案。 I had changed eclipse to use jdk 11 instead of the jre 17 that it came with.我已将 eclipse 更改为使用 jdk 11 而不是随附的 jre 17。 When I changed eclipse it back to using jdk 17 it worked again.当我将 eclipse 改回使用 jdk 17 时,它又可以工作了。 There must be something about gitlab's git repo and it's SSL requirements thats requiring the higher java version. gitlab 的 git 回购和 SSL 要求一定有一些东西需要更高的 java 版本。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 AWS Sagemaker 致命:无法读取“https://gitlab.com/my/repo.git”的用户名:终端提示已禁用 - AWS Sagemaker fatal: could not read Username for 'https://gitlab.com/my/repo.git': terminal prompts disabled gitlab-runner 无法解析主机:gitlab.com - gitlab-runner Could not resolve host: gitlab.com 是否可以配置 GitLab.com 的默认共享运行器? - Is it possible to configure GitLab.com's default shared runners? Gitlab SSL 内部和外部访问配置 - Gitlab SSL Configuration for both Internal and External Access SSH 的指纹与 Gitlab.com 不匹配 - Fingerpints for SSH do not match with Gitlab.com Gitlab Runner 多久连接一次 gitlab.com? - How often does Gitlab Runner connect to gitlab.com? .net 核心 http 调用在 AWS EC2 上抛出 ssl 连接错误,而它们在 OnPrem 服务器上工作正常 - 无法建立 SSL 连接 - .net core http calls are throwsing ssl Connection error on AWS EC2 while they work fine on OnPrem Servers - SSL connection could not be established 通过 https 访问 Gitlab 容器 - Access Gitlab container via https Gitlab 致命:无法访问'.......' SSL 证书问题:无法获得颁发者证书 - Gitlab fatal: unable to access '.......' SSL Certificate problem: unable to get issuer certificate GitLab 问题 - GitLab Problems
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM