Symfony: [Routing] Failing to execute git checkout (reference is not a tree)

Created on 9 Jan 2013  路  3Comments  路  Source: symfony/symfony

I am using Laravel 4 which depends on "symfony/routing" v. 2.2.*. When using composer to install my dependencies I get this message:

- Installing symfony/routing (dev-master 87a6689)
    Cloning 87a66890450658ccac99702ac5e4f002ece9e23e



  [RuntimeException]                                                                                                                        
  Failed to execute git checkout '87a66890450658ccac99702ac5e4f002ece9e23e' && git reset --hard '87a66890450658ccac99702ac5e4f002ece9e23e'  

  fatal: reference is not a tree: 87a66890450658ccac99702ac5e4f002ece9e23e

I've read that this can happen when using git push --force so that the repo and packagist are "out of sync". Any thoughts?

Most helpful comment

composer clear worked for me

All 3 comments

That's weird as Composer should be able to fix that by itself. I've force the update of the metadata on packagist, it should be fixed now.

Strange, but after a few trial and error steps I finally got it to work:

  1. Created a new folder + composer.json + install => worked without a problem
  2. Tried to resume installing with composer install in the project I first had this issue with => did not work
  3. Deleting the composer.lock + deleting the vendor directory finally did the trick (as it seems). Probably a caching thing.

Thanks.

composer clear worked for me

Was this page helpful?
0 / 5 - 0 ratings