composer中github的token更新(fatal: Authentication failed for 'https://github.com)
架构:
composer config --global gitlab-token.<domain> <access token>
例:
composer config --global gitlab-token.gitlab.com gbxxxxxx
该global参数将为当前用户设置令牌,这意味着Composer也将其用于所有其他存储库。
密钥已存储~/.composer/auth.json 相同的文件和命令可用于GitHub,Bitbucket等所有服务。
用检查现有设置
composer config --global --list
也可以在composer.json中直接配置
"repositories": [
{
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
},
{
"packagist": false
},
{
"type": "git",
"url": "https://github.com/tianyage/xxxx"
}
],
{
"type": "composer",
"url": "https://mirrors.aliyun.com/composer/"
},
{
"packagist": false
},
{
"type": "git",
"url": "https://github.com/tianyage/xxxx"
}
],
"config": {
"secure-http": false,
"github-oauth": {
"github.com": "这里是token"
}
},
"secure-http": false,
"github-oauth": {
"github.com": "这里是token"
}
},
版权声明:
作者:tianya
链接:https://tya.zone/p/98.html
来源:天涯博客
文章版权归作者所有,未经允许请勿转载。
THE END
0
二维码
海报
composer中github的token更新(fatal: Authentication failed for 'https://github.com)
架构:
composer config --global gitlab-token.<domain> <access token>
例:
composer config --global gitlab-token.gitlab.com gbxxxxxx
该gl……
共有 0 条评论