前一段时间有收到邮件说github安全认证等级要提升,但是我个人没有当回事,今天突然发现不能使用git 提交了,才看到如下内容:

详细到网页看了下,需要申请personal access token
创建token






命令行使用
git clone https://github.com/username/repo.git
Username: your_username
Password: your_token
实际上就是记住上面创建的token,然后再这里使用pull push等git命令的时候在password中填上token,而不是密码就行。

参考:
- https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/
- https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls
本文介绍了因GitHub安全要求提升,如何申请并使用Personal Access Token来代替密码进行Git操作,包括git clone和pull push等,以确保远程仓库的安全性。
2143





