报错: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": {}
}
  • 0
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论
这个错误是由于GitHub在2021年8月13日移除了对密码身份验证的支持所导致的。现在推荐使用个人访问令牌(Personal Access Token)进行身份验证。你可以在GitHub的文档中找到关于使用HTTPS URL进行克隆的更多信息,链接为https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls。在克隆时,你需要使用个人访问令牌来进行身份验证,而不是密码。你可以在https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/找到更多关于令牌身份验证的信息。所以,你需要生成一个个人访问令牌,并将其用作身份验证凭据来解决这个问题。 #### 引用[.reference_title] - *1* [fatal: Authentication failed for ‘https://github.com](https://blog.csdn.net/u010751974/article/details/126542823)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *2* [fatal: Authentication failed for ‘https://github.com/xxx.git/‘](https://blog.csdn.net/Blog_Sun/article/details/120038526)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [解决报错:fatal: Authentication failed for ‘https://github.com/*/*.git/‘](https://blog.csdn.net/liuzehn/article/details/128037853)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^koosearch_v1,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

阿蔡BLOG

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值