git clone时报错

    • 标题git clone时报错 remote: HTTP Basic: Access denied remote: You must use a personal access token with 'read_repository' or 'write_repository' scope for Git over HTTP. remote: You can generate one at “git地址”/profile/personal_access_tokens fatal: Authentication failed for “git地址”

文章是为了记录自己再次犯了这个错误,如果有不对的可以指出

标题git clone时报错 remote: HTTP Basic: Access denied remote: You must use a personal access token with ‘read_repository’ or ‘write_repository’ scope for Git over HTTP. remote: You can generate one at “git地址”/profile/personal_access_tokens fatal: Authentication failed for “git地址”

当我们想要clone一个项目时,发现了上面的错误

这个错误我是出现在输入密码的时候,我输入的密码是我的登录密码,它提示了我这个错误信息

  1. 他的意思是说我们需要生成一个具有读和写权限的私人access
  2. 做法呢就是,打开我们的gitlab,点击头像-》setting

4.点击侧边栏的Access Tokens

5. 会让我们添加一个令牌


这个图是我用谷歌翻译的,这个必须要选一个,选完之后点击创建个人令牌(create personal access token)
点击之后会在最上面生成一串字符串,类似于下图这种,这个字符串一定要保存好,因为只有这个时候可以看到他,刷新之后就没有了,并且下面的列表里也看不到它

好了,到这你就可以返回命令行工具重新clone了,当需要输入密码的时候你就把刚才生成的那串字符串粘贴过去就可以了

更多推荐

git clone报错 Access denied remote: You must use a personal access token with ‘rea