fatal: Authentication failed for ‘https://github.com/xxx/xxx.git/’:

问题描述

想从服务器上push代码到github,遇见fatal: Authentication failed for 的问题,弄了很久终于解决。

我是第一次使用github上传代码,按照以下两个博客内容进行操作。

  • https://blog.csdn.net/weiwenhp/article/details/52966540.
  • https://www.cnblogs.com/jn1011/p/10001160.html.

在git pull origin master步骤中出现身份验证通过的现象。

  1. 可能出现的解决方案:

网上查了一圈,大多都是说,这两个参数应该和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, 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.
fatal: Authentication failed for 'https://github.com/xxx/xxx.git/'

在网上搜了一堆解决方法,都不能解决后。

定睛一看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.

原来人家已经提示了问题所在,而我一度以为是账户密码的问题,好傻缺,大概意思就是2021.8月份开始远程登录不在支持使用账户密码的方式。。。。。。。。发现这个问题后马上找到了解决方法。

##############2.真正的解决方法############

解决方法

链接: https://blog.csdn.net/yjw123456/article/details/119696726.

按照里面提示,将原来的

git remote add origin https://github.com/xxx/xxx.git

指令换成

git remote set-url origin https://<your_token>@github.com/<USERNAME>/<REPO>.git

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

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

  1. github push代码出错fatal: Authentication failed for ‘https:/

    其实很多说是ssh keys设置错了,但其实未必,也要排查是否使用了代理之类的,我就是去掉代理就正确了.

  2. github push 出错:fatal: Authentication failed for 'https://github.com/ ..的解决

    重新执行Git config命令配置用户名和邮箱即可: git config -–global user.name "xxx" git config --global user.e ...

  3. 解决报错:fatal: Authentication failed for ‘https://github.com/*/*.git/‘

    目录 问题 解决 步骤一. 步骤二. 步骤三. ​步骤四. ​步骤五. 步骤六. 问题 今天创建一个 github 新仓库,首次上传本地代码时,遇到了一个报错.但是,之前这样操作肯定是没有问题的,毕竟 ...

  4. 解决:fatal: Authentication failed for ‘https://github.com/xxxx/git-demo.git/‘

    文章目录 报错 原因 解决步骤 生成令牌 报错 git执行语句:git push git-demo master 报错:fatal: Authentication failed for 'https: ...

  5. git向远程推送代码提示fatal: Authentication failed

    用git向远程推送代码提示invalid username or password, 参考 fatal: Authentication failed for 'https://github.com/w ...

  6. iOS开发:GitHub上传代码错误提示fatal: Authentication failed for 'https://gitee.com/XXX/XXX.git/‘的解决方法

    上传代码到Git上面,有时候会遇到各种情况,有些时候是因为合并代码冲突,有些时候是因为修改了Git的登录密码需要重新认证.那么这里就来讲解错误提示fatal: Authentication faile ...

  7. 阿里云Code(code.aliyun)提交代码时报错fatal: Authentication failed for‘https://code.aliyun.com/...‘身份验证失败

    阿里云Code(code.aliyun)提交代码时报错fatal: Authentication failed for'https://code.aliyun.com/-'身份验证失败,是因为阿里云登 ...

  8. git报错 git libpng warning: iCCP以及fatal: Authentication failed for ‘https://git.weixin.qq.com‘

    git打卡,本来是老哥带着我做项目,纯git新手小白,以后出现问题自己解决了,顺便分享一下自己的经验,防止以后忘记,顺便给新人铺个路~ 我一开始在使用git clone的时候,一共出现了两个错误,到处 ...

  9. 在提交文件到gitee远程仓库时报用户名密码错误 fatal: Authentication failed for ‘https://gitee.com/xxx/xxx.git 解决方案来啦 亲测有效

    在提交文件到gitee远程仓库时,突然出现一个弹框输入用户名 密码 很懵逼 输入了结果是错误的 D:\文件名>git push -u origin "master" remo ...

最新文章

  1. 面经:什么是Transformer位置编码?
  2. python3.x中如何实现print不换行
  3. sitemesh官网简介,安装配置教程。(非常适合新手)
  4. (十)webpack 和 babel
  5. 使用 dynamic 类型让 ASP.NET Core 实现 HATEOAS 结构的 RESTful API
  6. LeetCode动态规划 环形子数组的最大和
  7. 云场景实践研究第52期:畅游
  8. 内存分配器ptmalloc,jemalloc,tcmalloc调研与对比
  9. 通俗的解释交叉熵与相对熵
  10. C++11常用新特性
  11. Unity3D 导入资源
  12. 中职计算机基础课堂传统教学,中职计算机课堂教学初探
  13. gdc服务器维修员登录密码,gdc服务器密码
  14. windows转换U盘格式
  15. Jira配置LDAP实现统一认证
  16. PS绘制飘逸彩色丝带教程
  17. 注册一个公众号多少钱_微信公众号申请注册收费吗?要钱吗?多少钱?
  18. 把Google HK设为IE默认的搜索引擎
  19. 分布式系统下的幂等性问题如何解决?
  20. eos节点服务器_eos区块链php开发包

热门文章

  1. Trait 是什么?
  2. linux--Segfault详解
  3. 在小县城适合做什么生意?
  4. 数电技术基础大恶补09:脉冲产生及其整形
  5. 计算机专业扬大vs兰州大学,复试奇怪景象:兰州大学初试前五(400+)都被刷!扬州大学唯一上线也被刷!...
  6. GitHub也能CI/CD了 如何使用GitHub的Action?
  7. 收集的常用的CTF学习资源网站
  8. 在iframe 中视频可以正常播放,但是就是不能全屏。解决方法
  9. 温故而知新的知识蒸馏 Distilling Knowledge
  10. 【从0开始vue】点击后弹出对话框(其他部分变灰度) + 导航栏之间的切换动画