[英]302 redirect while downloading Jfrog PHP private artifact
Downloading (connecting...)
Downloading (connecting...)
Update failed (The \
"https://abc.jfrog.io/artifactory/api/composer/php-local/direct-dists/@abc/framework/abc_code.zip" \
file could not be downloaded, got redirect without Location (HTTP/1.1 302 Found))
Would you like to try reinstalling the package instead [yes]?
This was working earlier suddenly stopped.这是工作早些时候突然停止。
In browser also working fine.在浏览器中也工作正常。 Only while doing
composer update
or composer install
仅在进行
composer update
或composer install
时
This got solved by upgrading Composer version to 2.这通过将 Composer 版本升级到 2 来解决。
Jfrog throwing error when there is composer version 1.x while pulling Artifact. Jfrog 在拉取 Artifact 时存在 composer 版本 1.x 时抛出错误。
Sometime an OS doesn't easily upgrade to Composer 2 due to missing CA certificates.有时,由于缺少 CA 证书,操作系统无法轻松升级到 Composer 2。
Can follow below steps:可以按照以下步骤:
cd /etc/pki/tls/certs
ca-bundle.crt
file is there or not: file /etc/pki/tls/certs/ca-bundle.crt
ca-bundle.crt
文件是否存在: file /etc/pki/tls/certs/ca-bundle.crt
sudo curl https://curl.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt -k
run this command to download the CA certificates extracted from Mozilla . sudo curl https://curl.se/ca/cacert.pem -o /etc/pki/tls/certs/ca-bundle.crt -k
运行此命令以下载从 Mozilla 提取的 CA 证书。 php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" php composer-setup.php php -r "unlink('composer-setup.php');"
(always take the latest version from the download page as it changes from time to time)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.