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,在多处使用,因为要一个一个勾选权限也挺麻烦的其实。

相关推荐
吴声子夜歌4 小时前
TypeScript——泛型
前端·git·typescript
春日见5 小时前
3三分彻底了解Git Graph极其应用
git
风.foxwho6 小时前
jenkins使用 ED25519密钥 拉取Git 代码 配置
git·servlet·jenkins
ruanCat7 小时前
前端工程化工具链从零配置:simple-git-hooks + lint-staged + commitlint
前端·git·代码规范
木子小喵8 小时前
Git的使用介绍!超通俗!
git
coderYYY9 小时前
git push报错Authentication failed for ‘xxx’也不会弹要求输入用户名密码的最终解决方法
前端·git·gitee·github
@PHARAOH9 小时前
WHAT - git worktree 开发的并发模型
大数据·git·elasticsearch
苦瓜小生11 小时前
【Git】| 将拉下来的代码上传到自己的 Gitee 仓库(手把手教学)
git·gitee
WKP941811 小时前
git的merge和rebase操作
git
___波子 Pro Max.13 小时前
Git 分支切换
git