Artifactory Jfrog CLI无法进行身份验证 [英] Artifactory jfrog cli unable to authenticate
问题描述
在出现此错误时,尝试使用jfrog cli与人工服务器集成
Attempting to use the jfrog cli to integrate with an artifactory server, when I get this error
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浏览器中的a>显示TLS证书有效,但是我得到了另一个错误:
Navigating to https://artifactory.example.com/api/security/encryptedPassword in a browser shows that the TLS certificate is valid, however I get a different error:
{
"errors": [
{
"status": 404,
"message": "User not found: bill.gates"
}
]
}
ping命令还会返回TLS错误
ping commands also return TLS errors
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 cli用golang编写.运行版本:
jfrog cli is written in golang. Running version:
go version
go version go1.12.5 darwin/amd64
看着jfrog github问题,其他人也报告了类似的问题
Looking at the jfrog github issues, others have reported similar issues
https://github.com/jfrog/jfrog-cli/issues/277
如何获取jfrog cli以连接到工件服务器?
How can I get the jfrog cli to connect to the artifactory server?
推荐答案
错误是由配置错误的apache虚拟主机引起的.由于证书链捆绑在证书中,因此不需要SSLCertificateChainFile.Web浏览器可以毫无问题地处理这种配置错误,但是golang对该链的要求更高.
The errors were caused by a misconfigured apache vhost. Since the certificate chain is bundled in the cert, there was no need for the SSLCertificateChainFile. Web browsers handled this misconfiguration no problem, but golang was more particular about the chain.
配置错误
SSLCertificateFile "/etc/ssl/certs/artifactory.example.com.crt.pem"
SSLCertificateKeyFile "/etc/ssl/private/artifactory.example.com.key.pem"
SSLCertificateChainFile "/etc/ssl/certs/STAR.bad.example.com.pem"
工作配置
SSLCertificateFile "/etc/ssl/certs/artifactory.example.com.crt.pem"
SSLCertificateKeyFile "/etc/ssl/private/artifactory.example.com.key.pem"
这篇关于Artifactory Jfrog CLI无法进行身份验证的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!