duanbin4847 2019-06-25 18:51
浏览 407

Artifactory 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

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 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 is written in golang. Running version:

go version
go version go1.12.5 darwin/amd64

Looking at the jfrog github issues, others have reported similar issues

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

How can I get the jfrog cli to connect to the artifactory server?

  • 写回答

1条回答 默认 最新

  • dongmou9260 2019-06-25 18:51
    关注

    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.

    Bad configuration

      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"
    

    Working configuration

      SSLCertificateFile      "/etc/ssl/certs/artifactory.example.com.crt.pem"
      SSLCertificateKeyFile   "/etc/ssl/private/artifactory.example.com.key.pem"
    
    评论

报告相同问题?

悬赏问题

  • ¥20 @microsoft/fetch-event-source 流式响应问题
  • ¥15 ogg dd trandata 报错
  • ¥15 高缺失率数据如何选择填充方式
  • ¥50 potsgresql15备份问题
  • ¥15 Mac系统vs code使用phpstudy如何配置debug来调试php
  • ¥15 目前主流的音乐软件,像网易云音乐,QQ音乐他们的前端和后台部分是用的什么技术实现的?求解!
  • ¥60 pb数据库修改与连接
  • ¥15 spss统计中二分类变量和有序变量的相关性分析可以用kendall相关分析吗?
  • ¥15 拟通过pc下指令到安卓系统,如果追求响应速度,尽可能无延迟,是不是用安卓模拟器会优于实体的安卓手机?如果是,可以快多少毫秒?
  • ¥20 神经网络Sequential name=sequential, built=False