Composer Update Fails due to Github Authorization #3542
Comments
Possibly related to: https://developer.github.com/changes/2014-12-08-removing-authorizations-token/ |
Not really, solved it by creating new token and adding it to the project's composer.json. I'm not sure why the valid token on /Users/[USER]/.composer/auth.json could not be used. |
Maybe due to current user or COMPOSER_HOME environment variable at the time of the composer install being different of the expected? |
Could someone post the format of how to do this? I'm experiencing a similar problem and wish to solve it manually for the moment |
Yes, i want to know too |
You can solve it by creating a new github token to authenticate your composer requests. By defining your token globally:
Or by defining your token in a project composer.json: {
"config": {
"github-oauth": {
"github.com": "<TOKEN>"
}
}
} More information about the problem and how to generate github tokens: |
hugofonseca thanks a lot! |
@hugofonseca Thanks! |
The global Token config does not work (as mentiod in Post 3):
while in %appdata%\Composer\auth.json:
If I add the token to projects composer.json, it is working as expected. |
So the solution is to put the token into the Will this be solved as suggested in the latest issue #3566 @Seldaek ? Because as Malcolm Fell @emarref mentions: |
Hi, I figured out, that the auto-generated token (via composer) ist not accepted. If I create the key via GitHub's WebUI and replace the old one in composer.json, it is working. |
Have you tried that within the |
I generated new token on Gtihub and pasted this in ocmposer json of the project and it worked, thanks to hugofonseca |
Ok, so the important point is that the token has to be added to the `composer.json' file. The attempt with |
Gracias fonsecas72, funciona :D composer clear-cache composer global require "fxp/composer-asset-plugin:1.0.0-beta4" composer config --global github-oauth.github.com "my_token" composer create-project --prefer-dist yiisoft/yii2-app-advanced yii-application Así me funcionó para Yii2 Advanced Template. |
Hi I was face same problem.
thanks @fonsecas72
...but not in composer.json - that was just mistake in explanation, but if you run
|
Posted by codekman at http://www.yiiframework.com/forum/index.php/topic/60340-issue-while-installing-yii-2/ Please see the line above the cmd, here you will find the url and visit this url and you will git the token and paste the token.
|
Fix for this issue: composer/composer#3542
Is possible to remove auth token via Sure, I can remove by fe jg but build-in support in composer should be cool. |
This will do it for example: |
Can you guys make something which works without extensive modifications even for a beginner? |
solved by use this cmd: composer config --global --auth github-oauth.github.com |
solution : "config": { |
If you are facing Github token error then open composer.json file and paste below code "github-oauth": { into "config": { And then update composer
If you don't have Github token then first login to github.com and generate token and use ablove steps. |
The issue is that my token it has an underscore which is never valid according to this logic. Which here it fails.
|
@mijaelsaban make sure you update Composer to the latest version before reporting error, this was fixed last week. |
I am running on composer 2 and having this issue, anyway we can remove it make it just ask for auth again? as I am running in docker and cant get it cleaned up |
During composer update I am asked for my github credentials repeatedly. What may be causing this?
Yes, I am entering my password correct, I have tried several different accounts and I can get authorization from Github if I use curl from cmdline.
The text was updated successfully, but these errors were encountered: