git 如何在 TortoiseGit 中重置凭据?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/38733332/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-09 04:26:23  来源:igfitidea点击:

How to reset credentials in TortoiseGit?

gitcredentialstortoisegit

提问by glopes

This question is specifically about the TortoiseGit Windows client. I have a computer that I no longer use which must now be transferred to another programmer without formatting.

这个问题专门针对 TortoiseGit Windows 客户端。我有一台不再使用的计算机,现在必须在不格式化的情况下将其转移给另一个程序员。

Strangely enough, I can't seem to reset TortoiseGit credentials on this machine. There is apparently no credential helper set in the global settings. In fact, the Windows Credential Manager Service on this machine seems to be permanently disabled. I've changed all the local and global configuration settings to avoid mentioning my Git username at all, but still I can push commits from this machine to all my GitHub remotes.

奇怪的是,我似乎无法在这台机器上重置 TortoiseGit 凭据。全局设置中显然没有设置凭据帮助程序。事实上,这台机器上的 Windows Credential Manager Service 似乎是永久禁用的。我已经更改了所有本地和全局配置设置以避免提及我的 Git 用户名,但我仍然可以将提交从这台机器推送到我所有的 GitHub 远程服务器。

There are some stack overflow questions about setting and saving credentials. I want the exact opposite.

有一些关于设置和保存凭据的堆栈溢出问题。我想要完全相反的。

I don't even remember trying to save credentials in this particular computer ever, which is something I rarely do anyway, and I used this computer very little.

我什至不记得尝试在这台特定的计算机中保存凭据,无论如何我很少这样做,而且我很少使用这台计算机。

回答by Pieter Maes

go to \Control Panel\User Accounts\Credential Manager click on windows credentials and edit the corresponding credentials

转到 \Control Panel\User Accounts\Credential Manager 单击 Windows 凭据并编辑相应的凭据

回答by Muddesir Ahmed

Go to Credential Manager> Windows Credential in the system, there we can update the password.

转到系统中的凭据管理器> Windows凭据,我们可以在那里更新密码。

回答by MrTux

How to reset the stored passwords depends on the URL style.

如何重置存储的密​​码取决于 URL 样式。

For https credentials the username/password can be stored in the Windows credential store (see hereon how to reset) or also in the username in the remote repository URL.

对于 https 凭据,用户名/密码可以存储在 Windows 凭据存储中(请参阅此处了解如何重置),也可以存储在远程存储库 URL 中的用户名中。

For ssh authentication is often done using public key authentification. Here you need to remove the private key from the machine.

对于 ssh 身份验证,通常使用公钥身份验证来完成。这里需要从机器上删除私钥。

回答by Shravan40

First, Go to Credentials like:

首先,转到凭据,例如:

Right click → TortoiseGit → Settings → Git → Credential.

右键单击 → TortoiseGit → 设置 → Git → 凭证。

Then:

然后:

Select Credential helper: wincred - this repository only / wincred - current Windows user

选择凭据助手:wincred - 仅此存储库 / wincred - 当前 Windows 用户

回答by TenG

This worked for me on Windows 7 when the remote repos admin changed my password.

当远程存储库管理员更改我的密码时,这在 Windows 7 上对我有用。

From the Start Menu, select Git/Git Bash (I suppose Git CMD should work the same).

从开始菜单中,选择 Git/Git Bash(我认为 Git CMD 应该也能工作)。

Navigate (cd) to the git branch folder in the Git BASH/CMD shell.

导航 ( cd) 到 Git BASH/CMD shell 中的 git 分支文件夹。

Then type git pull,

然后输入git pull

A Dialogue box open with user name and password fields.

一个对话框打开,其中包含用户名和密码字段。

Enter here and save.

在这里输入并保存。