解决 `remote: You must use a personal access token with ‘api‘ scope for Git over HTTP.`

背景

在家远程办公的时候 git clone 报错:

remote: HTTP Basic: Access denied
remote: You must use a personal access token with 'api' scope for Git over HTTP.

解决 `remote: You must use a personal access token with ‘api‘ scope for Git over HTTP.`_第1张图片

解决方案

通过其提示的地址生成一个 Token:

remote: You can generate one at https://example.com/profile/personal_access_tokens

解决 `remote: You must use a personal access token with ‘api‘ scope for Git over HTTP.`_第2张图片

然后通过命令行组合 Token 操作即可:

git clone https://oauth2:${PERSONAL_ACCESS_TOKEN}@example.com/example/example.git

解决 `remote: You must use a personal access token with ‘api‘ scope for Git over HTTP.`_第3张图片

版权声明

本博客所有的原创文章,作者皆保留版权。转载必须包含本声明,保持本文完整,并以超链接形式注明作者后除和本文原始地址:https://blog.mazey.net/3488.html

(完)

你可能感兴趣的:(运维,git,github)