PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Friday, May 20, 2022

[FIXED] Where is my composer global config information stored in Ubuntu?

 May 20, 2022     composer-php, php     No comments   

Issue

I added a wrong github token to my global composer configuration and cannot remove it again.

I did

composer config --global --auth github-oauth.github.com myWrongTokenDamn

Now I cannot overwrite it by executing it again with the correct token and I don't know where this information is stored to remove it manually.

The command to show where it is stored just gives me the error, that I am using the wrong token. Thanks I know that....

I use Ubuntu 18.04 and installed composer following these instructions and then moving the binary to /usr/bin/composer.

Reinstalling didn't help either, so the information clearly is not stored at /usr/bin/composer


Solution

Weird solution:

I noticed that the behaviour did only occur, when I was within my current project, which had of course a composer.json file

What I did then I moved to my home directory and executed the the command again this time with the correct token:

composer config --global --auth github-oauth.github.com myCorrectLongToken

And the error message is gone.

While I am happy about the fix, it would be good if someone could explain what happened in the background.

Now

$ composer config --list

gives me the list of all settings including [home]

[home] /home/myUser/.config/composer

where everything is stored.



Answered By - Calamity Jane
Answer Checked By - Marilyn (PHPFixing Volunteer)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing