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
This got solved by upgrading Composer version to 2.
Jfrog throwing error when there is composer version 1.x while pulling Artifact.
Sometime an OS doesn't easily upgrade to Composer 2 due to missing CA certificates.
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
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.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)