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

场景描述

通常我们在日常开发时一般使用记住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

腾讯云限时秒杀【点击购买】

搬瓦工,CN2高速线路,1GB带宽,电信联通优化KVM,延迟低,速度快,建站稳定,搬瓦工BandwagonHost VPS优惠码BWH26FXH3HIQ,支持<支付宝> 【点击购买】!

Vultr$3.5日本节点,512M内存/500G流量/1G带宽,电信联通优化,延迟低,速度快【点击购买】!

阿里云香港、新加坡VPS/1核/1G/25G SSD/1T流量/30M带宽/年付¥288【点击购买】