Git 命令行登录

有时候登录命令行版本的git会出现这个错误

1remote: Support for password authentication was removed on August 13, 2021.
2remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.

原因是github不再支持密码验证,需要使用token验证,具体操作如下:

  1. 在github上生成token 网站:github.com/settings/tokens
  2. 下次命令行要求输入密码时,输入token即可

注意:token只会显示一次,所以要保存好,不然就要重新生成了,也可以用密码记录软件保存这个token,在多处使用,因为要一个一个勾选权限也挺麻烦的其实。

相关推荐
1379003408 小时前
Git 设置代理
git
xiaodunmeng15 小时前
sourcetree gitee 详细使用
git
LostSpeed16 小时前
git,gitea - tool - creat Gitea Empty Rep Dir
git·gitea
前端郭德纲18 小时前
vscode默认终端怎么设置成git bash
git·vscode·bash
近听水无声4771 天前
git 学习(基于Ubuntu和gitee)
git
2401_826097622 天前
同步&异步日志系统-日志落地模块的实现
c++·git·vim
半旧夜夏2 天前
阿里云IOT消息处理
java·ide·git·物联网·spring·阿里云
我们的五年2 天前
【Git版本控制器】第三弹——版本回退,撤销修改,删除文件
大数据·linux·git
一名嵌入式糕手2 天前
Git从基础到进阶
git
不cong明的亚子2 天前
github用户名密码登陆失效了
git·github