How to fix the «Authentication failed for» failure for a composer command?

(Dmitry Fedyuk) #1

Failed to execute git clone --no-checkout ‘’ ‘/var/www/public/vendor/mage2pro/stripe’ --dissociate --reference ‘/root/.composer/cache/vcs/https—’ && cd ‘/var/www/public/vendor/mage2pro/stripe’ && git remote add composer ‘’ && git fetch composer
Cloning into ‘/var/www/public/vendor/mage2pro/stripe’…
fatal: Authentication failed for ‘’

Mage2.PRO code repository supports 2 authentication methods:

  1. By a login and password.
  • By an SSH key.

How to diagnose the «Authentication failed» error

1. Authentication by a login and password

It is a legacy authentication method, but it is supported and will supported foreever.
You can check whether you use this method by checking the Composer’s auth.json file.
If you have this file, and the file has an entry for with login and password, then you do use the
login / password authentication.
In this case you should ensure that login and password in the auth.json file are correct by trying to use them on the webpage:

2. Authentication by an SSH key

It is a modern and the recommended method.
If your site does not use the method 1 (login / password authentication), then it surely uses the method 2 (SSH key authentication).
You should recheck the Step 4 of the installation instruction.


How to fix the «Failed to execute git clone... 401 Unauthorized while accessing» issue?
PHP Fatal error: Class 'Dfe\Stripe\Df\Payment\Method' not found in /var/www/public/app/code/Dfe/Stripe/Method.php
(Dmitry Fedyuk) #2

See also: