我的作曲家全局配置信息存储在Ubuntu的哪里 [英] where is my composer global config information stored in Ubuntu
问题描述
我在全局作曲者配置中添加了错误的github令牌,无法再次将其删除.
I added a wrong github token to my global composer configuration and cannot remove it again.
我做了
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....
我使用Ubuntu 18.04,并按照 https://getcomposer.org/download/说明进行安装然后将二进制文件移至/usr/bin/composer.
I use Ubuntu 18.04 and installed composer following this https://getcomposer.org/download/ instruction and then moving the binary to /usr/bin/composer.
重新安装也无济于事,因此,显然该信息未存储在/usr/bin/composer
Reinstalling didn't help either, so the information clearly is not stored at /usr/bin/composer
推荐答案
奇怪的解决方案:
我注意到只有当我在当前项目中时该行为才会发生,该项目中当然有一个composer.json文件
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
错误消息消失了.
虽然我对此修复感到满意,但如果有人可以解释一下后台发生的事情,那将是很好的.
While I am happy about the fix, it would be good if someone could explain what happened in the background.
现在
$ composer config --list
为我提供了所有设置的列表,包括[home]
gives me the list of all settings including [home]
[home] /home/myUser/.config/composer
存储所有内容的地方.
这篇关于我的作曲家全局配置信息存储在Ubuntu的哪里的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!