1

I'm trying to run a composer require worldpay/magento2-module-payments on Magento ver 2.1.8 and get this error:

[http]$ composer require worldpay/magento2-module-payments

  [Composer\Downloader\TransportException]
  The 'https://repo.magento.com/packages.json' URL required authentication.
  You must be using the interactive console to authenticate

In Magento devdocs I read that I need run this: composer update, however, I get the same error. It starts to load the repositories and then throw the error again:

[http]$ composer update
Loading composer repositories with package information


  [Composer\Downloader\TransportException]
  The 'https://repo.magento.com/packages.json' URL required authentication.
  You must be using the interactive console to authenticate

Anyone had a similar problem or know how to solve it?

0

What is your Command-line Environment? The problem may be caused by your Command-line Environment is not interactive.

I have never met the problem like you. I use the CentOS 7 via putty, when I composer require, it will ask my Magento authentication, input it and the composer will work.

  • I'm using Debian 6.0.8 via PuTTY, I never came across this before either... Not sure what it's caused by and how to solve it. – Greg Dec 27 '17 at 10:12
  • @BareFeet Have you upgraded your Magento version recently? Maybe your upgrade is not complete, and lead some files broken, please retry upgrade by the official guide devdocs.magento.com/guides/v2.1/comp-mgr/cli/cli-upgrade.html – Key Shang Dec 27 '17 at 10:18
  • It almost a fresh Magento 2.1.8 install, I haven't upgraded. Also, how can I check if the CMD line is interactive? – Greg Dec 27 '17 at 10:18
  • @BareFeet Because you use Debian 6.0.8 via PuTTY, so the problem should not be caused by interactive environment, maybe some interactive scripts file is broken. Check CMD line is interactive: when you run sudo command, whether it will prompt you input password. – Key Shang Dec 27 '17 at 10:25
  • I get: [http]$ sudo -bash: sudo: command not found but when I run su -l root I get prompted with a password. – Greg Dec 27 '17 at 10:36
0

It came out that I was using a wrapper mage-run rather than composer it self. I have to specify PHP version and binary of the composer to use it.

I could either, make sure the credentials are present in the composer.json file or run the composer specifying the PHP version and composer binary: php-7.0 /usr/local/bin/composer require worldpay/magento2-module-payments it it worked fine!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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