ARTIFACTORY:为什么Cargo安装失败,错误代码500

罗哈R M
2022-07-26 09:51

概述:

当为Cargo远程存储库配置代理时,解析包时会出现以下错误,因为JVM无法选择代理配置。

在Artifactory日志中,将记录以下错误:

[jfrt] [WARN] [98086e2a7dfaa57b] [o.a.a.g.]git serviceimpl:142] [art-exec-5122] - git仓库“cargo”初始化过程中出现错误2021-04-11 t12:28:59. 339z [jfrt] [WARN] [98086e2a7dfaa57b] [o.a.a.g]GitServiceImpl:142] [art-exec-5122] - git存储库“cargo”初始化过程中的错误。gitserviceexception . gitserviceexception: org.eclipse.jgit.api.errors.TransportException: https://github.com/rust-lang/crates.io-index.git: connection failed at org.artifactory. addon.gitserviceimpl . initremotebareclone (GitServiceImpl.java:254) at org.artifactory. addon.gitserviceimpl . initremoterepositoryingit (GitServiceImpl.java:222) at在Cargo客户机中,将记录以下500个HTTP状态码。装货箱
正在更新artifactory索引
error: failed to fetch ' https://:/artifactory/git/cargo-crates-remote.git '
引起的:
process didn't exit successfully: ' git fetch——force——update-head-ok 'https://:/artifactory/git/cargo-crates-remote。git' '+HEAD:refs/remotes/origin/HEAD' '(退出状态:128)
——stderr
致命:无法访问https://:/artifactory/git/cargo-crates-remote。git/':请求的URL返回错误:500

为了克服这个问题,我们需要添加以下代码片段,用于将代理配置更新到系统上的extraJavaOpts。在$JFROG_HOME /artifactory/var/etc目录下打开yaml文件,然后重启artifactory服务器使修改生效。

共享:
extraJavaOpts:“-Dhttp。proxyHost = <名称> -Dhttps。proxyHost = <名称> -Dhttp。proxyPort = <口> -Dhttps。proxyPort = <口> -Dhttp.nonProxyHosts = \“172 | 127.0.0.1。| | localhost。< yourdomain > \“-Dhttps.protocols = TLSv1.1 TLSv1.2”

注意:如果Artifactory运行在HA集群上,我们需要在系统中添加上述更改。所有节点的Yaml文件和滚动重启是必需的。

添加上述更改后,在货物远程存储库上执行zap缓存,然后尝试解决有助于克服问题的包。