github拉取费劲,推送不上去解决思路

148 阅读1分钟

使用soucetree 推送代码的时候推不上去 报错 remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see github.blog/2020-12-15-… for more information. fatal: Authentication failed for 'github.com/xxx/xxx.git…' Pushing to github.com/xxx/xxx.git… remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see github.blog/2020-12-15-… for more information. fatal: Authentication failed for 'github.com/xxx/xxx.git…' Completed with errors, see abovePushing to github.com/xxx/xxx.git… remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see github.blog/2020-12-15-… for more information. fatal: Authentication failed for 'github.com/xxx/xxx.git…' Pushing to github.com/xxx/xxx.git… remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead. remote: Please see github.blog/2020-12-15-… for more information. fatal: Authentication failed for 'github.com/xxx/xxx.git…' Completed with errors, see above

  • 原因分析: 大致是说 github对密码身份验证(也就是通过ssh公钥)的支持已于 2021 年 8 月 13 日移除。请改用个人访问令牌(personal access token)。

  • 解决办法: 1.先到github 的setting 找到 最底部的Developer settings

image.png

  1. 然后找到 Personal access tokens 点击生成token 并且赋值token

image.png

  1. 找到需要克隆的地址url eg:github.com/xxx/xxx.git… ,然后把token 插入到url的 https:// 插入 oauth2:你的token@ 就可以了 eg: https://oauth2:ghp_qtiFx4Kl8nK9**********Vxck4tYD3Eiu0R@github.com/xxx/xxx.git/

参考文章 blog.csdn.net/u012081284/…