无法从 git 更改用户名和密码 [英] Can't change username and password from git

查看:38
本文介绍了无法从 git 更改用户名和密码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我使用 git 扩展.我希望将密码和用户名存储在缓存中,所以我使用了:git-credential-winstore.在我不得不更改计算机(win7)中的密码并再次要求我插入密码之前,它工作正常.我输入了错误的密码,它存储在缓存中,我无法更改它.我试图卸载 git 并没有用.我从 usermyUser 中的 .gitconfig 文件中删除了以下行:

[凭证]助手 = !'C:\Users\grin_d\AppData\Roaming\GitCredStore\git-credential-winstore.exe'

结果是每次输入密码和用户名都得重新插入.当我再次运行时: git-credential-winstore 它再次向我显示错误的密码.

知道如何删除缓存中存储的错误密码吗?

解决方案

检查

(图片来自"凭据管理器 - Windows 存储密码和登录详细信息的位置")

您应该可以在那里删除错误的凭据.

2021 年更新:

最近的凭证助手现在将是manager-core",在Git-Credential-Manager-Core"来自 Microsoft:Git Credential Manager Core (GCM Core),一个基于 .NET 构建的安全 Git 凭证助手,可在 Windows 和 macOS 上运行(Linux 支持处于早期预览阶段).

要删除密码:

printf "protocol=https
hostname=github.com"|git credential-manager-core 擦除

I use git extension. I wanted the password and username to be store in cache so I used: git-credential-winstore. It worked fine until I had to change the password in my computer (win7) and it asked me again to insert password. I inserted a wrong password and it stores in the cache and I can't change it. I tried to uninstall git and no use. I deleted from .gitconfig file in usermyUser the lines:

[credential]
helper = !'C:\Users\grin_d\AppData\Roaming\GitCredStore\git-credential-winstore.exe'

The result was that I had to insert again every time the password and username. When I run again: git-credential-winstore it shows me again the wrong password.

Any idea how can I delete the wrong password stored in the cache?

解决方案

Check the control panel / User Accounts and Family Safety / User Accounts, or directly the Credential Manager:

(Image from "Credential Manager - Where Windows Stores Passwords & Login Details")

You should be able to delete the faulty credential there.

Update 2021:

The more recent credential helper would now be "manager-core", after "Git-Credential-Manager-Core" from Microsoft: a Git Credential Manager Core (GCM Core), a secure Git credential helper built on .NET that runs on Windows and macOS (Linux support is in an early preview).

To remove a password:

printf "protocol=https
hostname=github.com" | git credential-manager-core erase

这篇关于无法从 git 更改用户名和密码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆