Closed shivas closed 7 years ago
I found out it happens only when composer.json file was update (that is package added or removed) if its just versions update - all works fine
The composer remote is set up when the package is first installed, so yes it should be there unless you are messing with the vendor directory in between.
This error occurs when symfony2 application gets deployed with capifony, that means there is no "old" vendors repository, that is quite confusing. Maybe composer cache somehow involved?
Not the cache but do you really have a clear vendor dir? If it exists with some stuff leftover it might try to update a package that is not actually installed.
We currently have Satis (local/private composer repository), and looks like problems always happens when/only when one of repositories/packages what are "hosted" there are updated, maybe that's the case? Maybe composer doesn't get all info it needs from Satis?
I get this error all the time. Will investigate.
@jkobus @shivas Could you clone the code in this PR (https://github.com/composer/composer/pull/3608), use the composer binary in there to update/install and see if the bug is still there? I have investigated quite some time now in GitDownloader and helper classes. If the problem still occurs, I might be able to help fixing the problem.
i'm getting this issue. my token got revoked, after months of use. using
composer config -g github-oauth.github.com myoathtoken
'worked' (composer seemed happy), but when running composer update
again, it still tried to use the old token and fails. As I've provided a token, why doesn't composer prompt me to update it if it's not working? And as it doesn't, where is the config file stored on Windows so I can change the token manually?
What happends if you remove your vendor folder and then composer update again?
Now you tell me!... I've just returned to post that that is indeed the solution to the problem. There must be a way for Composer to deal with this automatically? I've now got to delete vendor directories on 20+ projects.
I already submitted #3608 for this issue a while ago. It has not been merged yet. From what I understand, there are other problems that need more attention at this moment.
@EagleEyeJohn Could you actually confirm that PR #3608 fixes your problem? The steps to test it would be clone https://github.com/frederikbosch/composer, run composer install for the composer package, and then try to redo the steps of your problem with composer binary from my PR (bin/composer).
This happened when I changed the branch I am requiring. To get past this error I deleted the project in the vendor directory and ran composer update.
@cnizzdotcom If this happends again, I am interested if #3608 solves the problem. Could you try with the same instructions I gave to @EagleEyeJohn?
Closing as it doesn't seem extremely relevant anymore.
Hey I was getting this error:
Failed to execute git show-ref --head -d
fatal: detected dubious ownership in repository at 'C:/Users/NTEch/AppData/Roaming/Composer/vendo
r/doctrine/inflector'
'C:/Users/NTEch/AppData/Roaming/Composer/vendor/doctrine/inflector' is owned by:
'S-1-5-32-544'
but the current user is:
'S-1-5-21-3269338778-2856369246-3259115991-1002'
To add an exception for this directory, call:
git config --global --add safe.directory C:/Users/NTEch/AppData/Roaming/Composer/vendor/doctrine
/inflector
I fixed that error using: git config --global --add safe.directory C:/Users/NTEch/AppData/Roaming/Composer/vendor/doctrine/inflector
Looking at code i see only one option that there is no composer remote setup yet, and he trying to set url for that...?
its in composer.phar/src/Composer/Downloader/GitDownloader.php:74