github推送报错处理


github推送报错处理

问题

用户名和密码都对,但是报错

因为是新建的仓库

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

sunyun@sunyundeMacBook-Pro VueBlog % git push -u origin master
Username for 'https://github.com': fejxc
Password for 'https://fejxc@github.com': 
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: Authentication failed for 'https://github.com/fejxc/vueblog.git/'

处理

参考https://www.jianshu.com/p/c2eb995ac42a

ghp_xxxxxxxxxxxxxxxxxxx
git remote set-url origin https://ghp_xxxxxxxxxxy@github.com/fejxc/vueblog.git
git branch -M master
git push -u origin master

文章作者: fejxc
版权声明: 本博客所有文章除特別声明外,均采用 CC BY 4.0 许可协议。转载请注明来源 fejxc !
评论
  目录