• 周一. 4月 22nd, 2024

5G编程聚合网

5G时代下一个聚合的编程学习网

热门标签

Github 之 Support for password authentication was removed…

admin

11月 28, 2021

2021年8月13日之后使用git push会报下面这个错:

fatal: HttpRequestException encountered.
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.

解决办法:

1. 创建 private token,参考:https://docs.github.com/en/github/authenticating-to-github/keeping-your-account-and-data-secure/creating-a-personal-access-token

把 private token记下来下面要用。

2. 使用git 命令重定向远程仓库地址:

即 git remote set-url origin https://[private token] @github.com/[用户名]/[仓库名]

如,原来的仓库地址是 https://github.com/zhangsan/project1.git,private token是abc,则使用指令:

git remote set-url origin https://[email protected]/zhangsan/project1.git

转载请注明出处:https://www.cnblogs.com/jietian331/p/15146108.html

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注