Composer: "Repository type is not registered: git"

Out of the blue, my Composer is throwing a fit when I try and install a local repository (having worked perfectly for the past 3 months) using composer install

The error:

[InvalidArgumentException] Repository type is not registered: git

The offending block in the composer.json file:

"repositories": [ { "type": "git", "url": "[email protected]:/xxx/yyy.git" }
],

I've tried completed removing and re-installing composer and changing the 'type' from 'git' to 'github' and 'vcs' as per the official docs. Nothing has helped so far.

1

3 Answers

My colleague has informed me that this is the cause...

Try with vcs instead of git, as example:

"repositories": [ { "type": "vcs", "url": "[email protected]:/xxx/yyy.git" } ],

More info here

Hope this help

like already mentioned, symfony/flex seemed to be broken (v. v1.0.81?) and composer uses symfony-flex-plugin

so composer install was working only with the parameter --no-plugins

when i used that: a new flex version was installed and my project dependencies where installed, but the absence of plugins luckily failed afterwards only with symfony-cmd: command not found

But since 'flex' was updated composer install was working fine again (plugins working too)

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

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

You Might Also Like