fatal: Authentication failed for ‘/xxx/xxx.git/’:
问题描述
想从服务器上push代码到github,遇见fatal: Authentication failed for 的问题,弄了很久终于解决。
我是第一次使用github上传代码,按照以下两个博客内容进行操作。
/weiwenhp/article/details/52966540./jn1011/p/10001160.html.
在git pull origin master步骤中出现身份验证通过的现象。
可能出现的解决方案:
网上查了一圈,大多都是说,这两个参数应该和github账户匹配,即username应该是github账户名字,email是github绑定邮箱。
git config --global user.name [username]git config --global user.email [email]
我改正后依旧不行。始终出现以下问题。
remote: Support for password authentication was removed on August 13, . Please use a personal access token instead.remote: Please see https://github.blog/-12-15-token-authentication-requirements-for-git-operations/ for more information.fatal: Authentication failed for '/xxx/xxx.git/'
–
在网上搜了一堆解决方法,都不能解决后。
定睛一看remote: Support for password authentication was removed on August 13, . Please use a personal access token instead. remote: Please see https://github.blog/-12-15-token-authentication-requirements-for-git-operations/ for more information.
原来人家已经提示了问题所在,而我一度以为是账户密码的问题,好傻缺,大概意思就是.8月份开始远程登录不在支持使用账户密码的方式。。。。。。。。发现这个问题后马上找到了解决方法。
##############2.真正的解决方法############
解决方法
链接: /yjw123456/article/details/119696726.
按照里面提示,将原来的
git remote add origin /xxx/xxx.git
指令换成
git remote set-url origin https://<your_token>@/<USERNAME>/<REPO>.git
的格式后成功解决这个问题。。