1200字范文,内容丰富有趣,写作的好帮手!
1200字范文 > github push 代码出现fatal: Authentication failed for ‘https://github.com/xxx/xxx.git/‘

github push 代码出现fatal: Authentication failed for ‘https://github.com/xxx/xxx.git/‘

时间:2022-10-08 13:15:12

相关推荐

github push 代码出现fatal: Authentication failed for ‘https://github.com/xxx/xxx.git/‘

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

的格式后成功解决这个问题。。

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。