[英]git: Invalid username or password even tough no credential manager or credentials in Wincred
由於我最后一個用於github認證的令牌過期,windows上的git提示我用戶名和密碼無效(哪個是正確的)
唯一的問題是,無論我做什么,我都無法重置、更改或刪除它們。 I tried changing them in Credential Manager ( Control Pannel > Credential Manager ) I tried removing all entries corresponding to git or github, tried removing the credential helper ( git config --unset credential.helper
) on all level ( --global
, --local
等)但仍然沒有任何效果。
目前我可以推送或拉取更改的唯一方法是通過 WSL2 使用 git 命令,它確實提示我輸入用戶名和密碼(我必須保存在某處或每次從 GH 創建一個新的令牌)
我不知道,我似乎找不到任何其他解決方案的線索。
感謝@SOROMEED 評論,我能夠找到新的解決方案。
git 配置文件,位於C:\Users\<username>\.gitconfig
有以下塊:
[url "https://<gh_username>:<old_gh_token>@github.com"]
insteadOf = https://github.com
刪除該行,強制 git 再次提示我輸入憑據
注意: gh_username
也是不正確的,因為我在幾個月前更改了它,但在此文件中沒有更改。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.