場景描述
通常我們在日常開發時一般使用記住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