gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

时间:2024-11-30 14:32:55
错误:
remote: HTTP Basic: Access denied
remote: You must use a personal access token with ‘api’ scope for Git over HTTP.
remote: You can generate one at https://github.com/profile/personal_access_tokens

错误原因:

You must use a personal access token with ‘api’ scope for Git over HTTP.   

即: 没有为GitLab设置以"api"为权限范围的token(可以理解为令牌)


以上问题如何解决?

  可以通过设置gitlab的个人令牌来解决

第一步:点击setting

gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

第二步:选择Access Tokens

gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

第三步:创建token(令牌)

gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

第四步:保存好秘钥

gitlab克隆报错:remote: HTTP Basic: Access denied;remote: You must use a personal access token with ‘api’ scope for Git over HTTP.

第五步:clone项目

  •   账号就是你的gitlab账号
  •   密码是令牌秘钥(第四步的秘钥)

祝各位生活愉快,头发慢点落!