GitDownloader fails on composer.json update, when there is packages added as git repositories #2202

Open
shivas opened this Issue Aug 23, 2013 · 14 comments

6 participants

@shivas
[exec] �[0m�[31m*** [err :: internal.xxx.com] [RuntimeException]
     [exec] �[0m�[31m*** [err :: internal.xxx.com] Failed to execute git remote set-url composer 'ssh://xxx@xxx.xxx.com/home/repositories/xxx.git' && git fetch composer && git fetch --tags composer
     [exec] �[0m�[31m*** [err :: internal.xxx.com] 
     [exec] �[0m�[31m*** [err :: internal.xxx.com] Error reading response length from authentication socket.
     [exec] �[0m�[31m*** [err :: internal.xxx.com] Permission denied, please try again.
     [exec] �[0m�[31m*** [err :: internal.xxx.com] Permission denied, please try again.
     [exec] �[0m�[31m*** [err :: internal.xxx.com] Permission denied (publickey,password).
     [exec] �[0m�[31m*** [err :: internal.xxx.com] fatal: The remote end hung up unexpectedly

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

@shivas

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

@Seldaek
Composer member

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.

@shivas

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?

@Seldaek
Composer member
@shivas

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?

@jkobus

I get this error all the time. Will investigate.

@frederikbosch

@jkobus @shivas Could you clone the code in this PR (#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.

@EagleEyeJohn

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?

@frederikbosch

What happends if you remove your vendor folder and then composer update again?

@EagleEyeJohn

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.

@frederikbosch

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.

@frederikbosch

@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).

@cnizzdotcom

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.

@frederikbosch

@cnizzdotcom If this happends again, I am interested if #3608 solves the problem. Could you try with the same instructions I gave to @EagleEyeJohn?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment