如果你最近使用git提交代码时,报错 类似 2021年8月13号 authentication 认证被移除了,Please use a personal access token instead.
说明以前的用户名密码提交代码的认证方式不可用了,坑啊,搞半天…………
清除用户名密码配置:
git config --system --unset credential.helper
使用Token方法:
#github官网生成自己仓库的Token git clone https://$token@github.com/$user/$repo.git #然后就可以正常操作了 git init git add . git commit -m '' #现在默认分支main git push origin main