我存储在 Ubuntu 中的作曲家全局配置信息在哪里全局、作曲家、信息、Ubuntu

2023-09-07 08:59:58 作者:巷尾分手的泪

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
UCenter Home全局动态功能详解

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 this https://getcomposer.org/download/ instruction 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

解决方案

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.