3

I keep getting this warning when I run composer update in my Magento 2 install.

Loading composer repositories with package information
Your configuration does not allow connections to http://packages.firegento.com/packages.json. See https://getcomposer.org/doc/06-config.md#secure-http for details.
http://packages.firegento.com could not be fully loaded, package information was loaded from the local cache and may be out of date
The "https://packages.magento.com/packages.json" file could not be downloaded: php_network_getaddresses: getaddrinfo failed: Name or service not known
failed to open stream: php_network_getaddresses: getaddrinfo failed: Name or service not known
https://packages.magento.com could not be fully loaded, package information was loaded from the local cache and may be out of date
Updating dependencies (including require-dev)

Still it seems like the update goes fine everytime but I wonder how can I fix this problem ?

4 Answers 4

6

There are two issues in there:

1.) connection to a http composer repository http://packages.firegento.com - changing this to https://packages.firegento.com should solve this (please note that this repository is not included in a default Magento install)

2.) https://packages.magento.com/ is the old https://repo.magento.com/ from Magento 2 beta days. This has been shut down so suggest removing this from your composer.json

1

The firegento problem was caused by the repository being globally declared.

Thus I had to remove the repository from /home/<user>/.composer/config.json

Regarding the magento issue, similar problem, it was globally declared I ended up running:

composer config -g -- repositories.magento composer https?://repo.magento.com
0

For Linux users (Centos 6,7) Check your name servers that you have in /etc/resolv.conf working properly with the below command

nslookup www.google.com

If it is not working used the google public name server at 8.8.8.8 and 8.8.4.4

nameserver 8.8.8.8
nameserver 8.8.4.4
0

Raphael's answer works and it should be used when you want to change the magento repository URL in composer config to repo.magento.com

Alternatively, following will also get rid of the error and it can be used if you want to unset the magento repository in global composer config instead of changing the URL:

composer config -g --unset repositories.magento 

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.