通过composer install 从github上下载依赖时报错:
Cloning failed using an ssh key for authentication, enter your GitHub credentials to access private repos
原因:
这个是github的ssh密匙认证错误,提示要重新生成token,然后保存在/root/.config/composer/auth.json文件中
解决:
根据提示,
when you need to access private GitHub repositories as well, go to https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2022-04-07+0222
打开提示里面地址,来生成新的token
即:
https://github.com/settings/tokens/new?scopes=repo&description=Composer+on+localhost.localdomain+2022-04-07+0222
点击regenerate,生成新token,复制生成的token
[root@localhost snipe-it]# vim /root/.config/composer/auth.json
{
"bitbucket-oauth": {},
"github-oauth": {"github.com":"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"},
"gitlab-oauth": {},
"gitlab-token": {},
"http-basic": {},
"bearer": {}
}