前言

好久没在github上提交代码,提交代码报错:

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/LLDLLY/lldlly.github.io.git/'

好吧,来搞一个token吧

申请token

右上角头像点击 => Setting => Developer setting => Personal access tokens =>Generate new token

申请好了之后,复制

本地设置

1
git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git