本文主要是介绍报错:Cloning failed using an ssh key for authentication, enter your GitHub credentials to access priva,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
通过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": {}
}
这篇关于报错:Cloning failed using an ssh key for authentication, enter your GitHub credentials to access priva的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!