Artifactory jfrog cli:x509:由未知机构签名的证书

3

环境:Windows Server 2019

尝试使用jfrog cli与Artifactory服务器集成时,出现以下错误:

jfrog rt config example-company --url=$ARTIFACTORY_URL --user=$ARTIFACTORY_USER --password=$ARTIFACTORY_PASS
[Info] Encrypting password...
[Error] Get https://artifactory.example.com/api/security/encryptedPassword: x509: certificate signed by unknown authority

在浏览器中导航到https://artifactory.example.com/api/security/encryptedPassword,可以看到TLS证书是有效的,但我收到了一个不同的错误:
{
  "errors" : [ {
    "status" : 404,
    "message" : "User not found: anonymous"
  } ]
}

ping 命令也会返回 TLS 错误。

jfrog rt ping --url=https://artifactory.example.com
[Error] Get https://artifactory.example.com/artifactory/api/system/ping: x509: certificate signed by unknown authority

查看jfrog的GitHub问题,其他人报告了类似的问题。

https://github.com/jfrog/jfrog-cli/issues/277

我找到了一个类似的Stack Overflow问题:Artifactory jfrog cli unable to authenticate,但它没有描述调试过程和解决方案是如何找到的,因此我不知道是否适用于我的情况。

我们没有使用自签名证书。根据Google Chrome中的证书查看器,证书来自Sectigo RSA Domain Validation Secure Server CA。

如何使jfrog cli连接到Artifactory服务器?

2个回答

2

我可以确认这个有效。这应该是被接受的解决方案。 - Étienne

1
我假设您正在使用自签名证书的Artifactory。您应该在JFrog CLI中添加这些证书,请参考JFrog wiki获取更多见解。将证书放置在JFrog CLI的主目录下的security/certs目录中。

你的假设是错误的。证书是从我们的托管公司购买的,根据Google Chrome的证书查看器,它来自Sectigo RSA域验证安全服务器CA。 - Amedee Van Gasse

网页内容由stack overflow 提供, 点击上面的
可以查看英文原文,
原文链接