SpringCloud server 连接Git报错org.eclipse.jgit.api.errors.TransportException: https://xxx.git: Secure connection to https://xxx.git could not be stablished because of SSL problems 解决
spring:
cloud:
config:
server:
git:
uri: https://xxx.git
default-label: master
连接的git仓库是公开的,排除git密码验证问题。
看IDEA打印的日志为
org.eclipse.jgit.api.errors.TransportException:https:xxx.git: Secure connection to https:xxx.git could not be stablished because of SSL problems
at org.eclipse.jgit.api.FetchCommand.call(FetchCommand.java:254) ~[org.eclipse.jgit-5.1.3.201810200350-r.jar:5.1.3.201810200350-r]
可以发现是SSL的问题。
在配置文件中设置忽略SSL验证 spring.cloud.config.server.git.skip-ssl-validation: true
启动项目发现已经可以正常启动,问题解决。(前提是没有密码验证的问题)