问题描述:
1. vscode终端git push提交代码报错Missing or invalid credentials.
2. mobax上git push报错:
注意:此时报的有
Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
解决方法:
1. August 13, 2021后,git提交要用token验证而非密码,去github 设置token值并保存起来
可参考:https://blog.csdn.net/weixin_41010198/article/details/119698015
2.此时再git push代码会提示输入账号密码,填密码的地方,输入刚刚保存的token值就可以正常提交了。
3.新问题:这样每次提交都要重新输入token值,太麻烦了。
解决方法:让git记住github的token值
1. git config --global credential.helper 'cache --timeout=3600'
可参考:
https://www.cnblogs.com/marsggbo/p/15378370.html