Composer update error

Hello Craig,

I have been trying to run composer update command via SSH and I get the following message
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos

any idea on how to fix this?

thank you!

Hey @Accessotronik,

Potential Cause A
From what I’ve read, this can be an intermittent issue caused on “their” end and not yours. It could be related to a 3rd party module that’s trying to connect to the repo. Have you tried again since?

Potential Cause B
It’s also possible that you have a 3rd party module installed that requires an authentication ticket that’s out of date. An example of this, is when you purchase a module and the composer instructions tell you to add something like this before running the composer require command:

composer config http-basic.gitlab.example.com token abc123

Which then allows you to 6 months of free updates, which is when the credentials expire and lock you out because you haven’t extended your support license.

auth.json example
If you open the auth.json file, you see a list of saved usernames and passwords that are used to authenticate your permissions to update/install a module. This would be a good starting point to verify your logins with the 3rd party modules.

As your error refers to the git repo, then a “gitlab” entry might be the culprit.

{
  "http-basic": {
    "repo.magento.com": {
      "username": "example9gm78izipfrum56l95npmdp",
      "password": "exampleh7wrcxyzsbnp9ky9d9sibwg"
    },
    "gitlab.example.com": {
      "username": "token",
      "password": "example5tb38wpxh1awv5p9lax2wn"
    },
    "composer.example.com": {
      "username": "example016difp7cmeobkl0v2en050",
      "password": "example0nif8yvu3rk5f0dvjc0lu21"
    }
  }
}

composer.json
If you don’t find anything in auth.json, you may also want to look at composer.json towards the bottom half of the document.

Hello Craig,
thank you for taking the time to help out!

I have tried again for the past two days to run my composer update to upgrade to magento 2.3.4. and I still get the same error.

The auth.json file contain only my private and public key credentials from the magento marketplace.

thank you

Is there anything in your composer.json that refers to “git” in it anywhere? These ones are normally in the bottom half of the document (I think).

Yes there was! Seems like I had a disabled module installed and it was still being refered in the composer. I deleted the lines and it is now working.

Many thanks! really appreciated your insight and resourcefulness.

1 Like