git - Grgit:禁用 ssl 验证
问题描述
我正在使用 gradle 插件Grgit在测试执行之前从远程仓库获取 SQL 迁移。
我收到以下错误
Caused by: javax.net.ssl.SSLHandshakeException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
at org.eclipse.jgit.transport.http.JDKHttpConnection.getResponseCode(JDKHttpConnection.java:85)
at org.eclipse.jgit.util.HttpSupport.response(HttpSupport.java:205)
at org.eclipse.jgit.transport.TransportHttp.connect(TransportHttp.java:654)
... 108 more
Caused by: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 111 more
Caused by: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
... 111 more
是否有任何可能的方法来禁用 ssl 验证步骤?据我了解,该插件使用Jgit库。我试图导出GIT_SSL_NO_VERIFY=true
,但它似乎不起作用。
另外,这是我的毕业任务
task fetchFlywayMigrations {
def migrationsDir = 'src/main/resources/fromRemote/migrationsRepo'
def migrationsRepo = gitRepoSQLMigrations
println "Migrations repo: $migrationsRepo"
doFirst {
delete migrationsDir
println "${migrationsDir} has been cleaned"
}
doLast {
Grgit.clone(dir: file("$migrationsDir"), uri: "${migrationsRepo}")
println "New migrations has been downloaded to ${migrationsDir}"
}
}
解决方案
推荐阅读
- mysql - mysql中的except关键字抛出EOF
- python - 如何在文件中查找和检查特定单词然后将其删除
- c - 在 Ubuntu 环境中使用 C 从 .txt 文件中的文本输出 CRC32 hex
- asp.net-core-mvc - ASP.NET Core MVC:页面不呈现 href
- python - 如何使用 Selenium Python 在循环中替换 url
- mysql - MySQL 触发器 - 我已将它们设置为填充新表,但需要一种从现有数据中填充的方法
- html - 如何通过 HTML 将字符串传递给 ng-template?
- bash - 从 PATH 变量中删除任何包含空格的路径
- matrix - 特征值和特征向量
- javascript - 在一个组件中使用值并在另一个组件中重置