使用https协议git push指令报错如何解决

遇到问题:使用指令git push报错,如下:

remote: Support for password authentication was removed on August 13, 2021.
remote: Please see https://docs.github.com/en/get-started/getting-started-with-git/about-remote-repositories#cloning-with-https-urls for information on currently recommended modes of authentication.
fatal: Authentication failed for 'https://github.com/wanghuiwiki/shop.git/'

解决办法:

fatal提示参考:https://docs.github.com/en/ge...

github docs 文档中描述说当Git提示你输入密码时,请输入你的personal access token

➥创建 personal access token


然后再次尝试git push指令;根据弹框输入用户名和刚保存的token;举例:我这里是
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

如果看到如下效果(没有fail错误),则表明提交成功.

[验证]此时可以观察浏览器,刷新线上仓库的地址;

作者:鬼牛阿飞原文地址:https://segmentfault.com/a/1190000043189030

%s 个评论

要回复文章请先登录注册