gpt4 book ai didi

github - 无法连接到 GitHub API

转载 作者:行者123 更新时间:2023-12-04 16:09:49 27 4
gpt4 key购买 nike

尝试使用 github 时出现错误“无法连接到 GitHub API:org.kohsuke.github.HttpException:服务器返回 HTTP 响应代码:-1,消息:URL 为‘null’:https://github.xxx.com/api/v3/user” Jenkins 中的拉取请求生成器

最佳答案

您可能需要将证书颁发机构证书添加到 java keytool。

如果您查看您的 jenkins 日志并发现类似这样的内容:

org.kohsuke.github.HttpException: Server returned HTTP response code: -1, message: 'null' for URL: https://github.xxx.com/api/v3/user

向下滚动,看看是否有这样一行:

Caused by: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target

此错误表示 SSL 握手因 PKIX 路径/证书路径相关问题而失败。尝试将您的 CA 证书添加到 key 工具并重新启动 Jenkins 以查看是否有帮助。

Here's the post这帮助我使用 keytool 修改了 java 证书。 (默认的 key 工具密码是“changeit”)

关于github - 无法连接到 GitHub API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44548942/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com