Skip to content

composer update results in: RuntimeException: Failed to clone http://github.com/composer/installers.git #1707

Closed
prembo opened this Issue Mar 18, 2013 · 5 comments

4 participants

@prembo
prembo commented Mar 18, 2013

I haven't had any issues with composer updates on this project until I did a composer self-update yesterday.

Now I seem to getting these exceptions for most modules including composer/installers. Anyone else experiencing this?

$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
  - Updating composer/installers dev-master (f5dea66 => v1.0.3)
    Checking out v1.0.3

  [RuntimeException]                                                                                      
  Failed to clone http://github.com/composer/installers.git via git, https and http protocols, aborting.  

  - git://github.com/composer/installers.git                                                              
    fatal: Not a git repository (or any of the parent directories): .git                                  

  - https://github.com/composer/installers.git                                                            
    fatal: Not a git repository (or any of the parent directories): .git                                  

  - http://github.com/composer/installers.git                                                             
    fatal: Not a git repository (or any of the parent directories): .git                                  

update [--prefer-source] [--prefer-dist] [--dry-run] [--dev] [--no-dev] [--no-custom-installers] [--no-scripts] [--no-progress] [-v|--verbose] [-o|--optimize-autoloader] [packages1] ... [packagesN]
@Seldaek
Composer member
Seldaek commented Mar 19, 2013

Seems like your vendor/composer/installers dir is missing a .git folder. Removing that directory and running update again should fix it.

@Seldaek Seldaek closed this Mar 19, 2013
@prembo
prembo commented Mar 19, 2013

Thank you @Seldaek. That did the trick.

@marcheidemann

thx

@salarmehr

@Seldaek That is a workaround.
I had the issue several times. If deleting a folder is safe composer need to do it by itself.

@Seldaek
Composer member
Seldaek commented Nov 8, 2015

Yeah composer could catch this particular exception and in case it happens wipe the dir and try again, but this only happens if you mess up with the vendor directory yourself though. By default everything works fine. And if you mess with the .git dirs of vendors you might have other issues than this one, like it'll try to git checkout your main project's git repo instead of the vendor's repo as git automatically looks up directories to find a git dir. All in all by messing with the vendor dir you void the warranty..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.