-
问题描述
在本地电脑执行以下操作的时候
git remote add origin https://github.com/957625959/-.git
git branch -M main
git push -u origin main
在使用 Git 上传将本地仓库推送到远程服务器时,出现了以下问题:
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/957625959/-.git/'
其实是2021年 8 月 13日,github中通过 用户名然后输入密码
的认证方式被移除了,只能通过个人访问码的方式进行认证。
-
解决方案
在github上创建访问码,步骤如下:
- 点击settings