Git生成token及使用

编程知识 更新时间:2023-05-02 19:03:34
  • git push的时候发现不能push,有如下报错
remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information.
fatal: 'https://github/zion6135/CPP-study.git/' 鉴权失败

查了一下,需要生成token,

1.生成token 

Settings => Developer Settings => Personal Access Token => Generate New Token  => 填写表格 => Generate token => 复制PAT

  • 下图为token第一次clone复制此token即可(一定要复制,关掉后就看不到了)

  参考:首次使用git,生成token_qq_43103581的博客-CSDN博客_git token

2.使用token,把生成的token当作密码,用户名是token的名字

参考

​​​​​​使用git提交代码到github时报错:Support for password authentication was removed on August 13, 2021._SunnyZhang在奋斗的博客-CSDN博客_提交到github报错

之后用自己生成的token登录,把上面生成的token粘贴到输入密码的位置


 

 

更多推荐

Git生成token及使用

本文发布于:2023-04-28 04:27:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/bea24e7952c7b683de1eb46fd8acae72.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:Git   token

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!

  • 107630文章数
  • 27230阅读数
  • 0评论数