ssl Artifactory远程存储库和NuGet库之间的连接错误

euoag5mw  于 2022-11-14  发布在  其他
关注(0)|答案(1)|浏览(104)

我在RHEL 7上运行Artifactory 7.x。创建远程存储库以缓存NuGet包,Artifactory远程存储库为“https://www.nuget.org/”。
在第1天,当curl到www.example.com失败且连接失败时,完成以下操作以配置SSL证书nuget.org

A] > cd /etc/pki/ca-trust/source/anchors 
          B] > vi orgnuget.crt 
          C] > openssl s_client -showcerts -connect nuget.org:443 >> orgnuget.crt 
          D]  removed unnecessary data from orgnuget.crt and ensured that all 4 keys (0 to 3) with –BEGIN—and –END--
          E] copy orgnuget.crt to  /etc/pki/ca-trust/source/anchors/orgnuget.crt 
          F] > update-ca-trust extract 
          G] > curl -v https://nuget.org -> Successful 
          H] > cp orgnuget.crt /opt/jfrog/artifactory/var/etc/security/keys/trusted/ 
          I] > sudo chown artifactory:artifactory orgnuget.crt
          J] >  Restart Linux server 
          K] In Artifactory, test connection to https://nuget.org from remote repo, successful

在第2天,curl到https://nuget.org成功,但在Artifactory中,从远程存储库到https://nuget.org的测试连接失败,并出现以下错误。
“连接到远程存储库失败:PKIX路径构建失败:安全性提供者证书路径生成器异常:找不到请求目标的有效证书路径”
要修复上述错误,请在chrome中打开“https://www.nuget.org/”,找到“Microsoft Azure TLS Issuing CA 05”根颁发者,下载.crt并附加到orgnuget.crt,然后重复上述所有步骤A到K,最后在Artifactory到远程存储库的连接测试中出现相同的错误“https://www.nuget.org/”。

lb3vh1jj

lb3vh1jj1#

请遵循KB ArticleHow to resolve unable to find valid certificate path to requested target”error” 并下载www.example.com的证书nuget.org,然后将其导入Artifactory的受信任根证书。完成此操作后,您将能够连接Artifactory NuGet存储库。

相关问题