git push 提交操作出现 fatal: Authentication failed for 错误 解决方案

标签:
来源: 老季博客
日期: 2019-11-15
作者: 腾讯云/服务器VPS推荐评测/Vultr
阅读数: 51

场景描述

通常我们在日常开发时一般使用记住git密码功能,但是如果密码输入错误了就不会再弹出输入密码框了。

git add . ; git commit -m ‘laoji.org ‘ ; git push
On branch master
Your branch is ahead of ‘origin/master’ by 1 commit.
(use “git push” to publish your local commits)
nothing to commit, working tree clean
remote: Coding 提示: Authentication failed.
remote: 认证失败,请确认您输入了正确的账号密码。

配置用户信息

git config --global user.name [username]
git config --global user.email [email]

查询用户信息

git config --list

3、如果push遇到在输入密码是熟错后,就会报这个错误fatal: Authentication failed for

解决办法( 请使用管理员运行

git config --system --unset credential.helper

之后你在push就会提示输入名称和密码

如不使用管理员运行可能会出现如下错误:

error: could not lock config file C:/Program Files/Git/mingw64/etc/gitconfig: Permission denied

链接到文章: https://jiloc.com/46547.html

发表回复

您的电子邮箱地址不会被公开。 必填项已用*标注