Update Password In Git Client

Git Password Update

Here I am going to show you how to update password in Git client. You may need to update password in your Git client while accessing Git repository for several reasons.

For example, your organization allow access to different systems using SSO (Single Sign On). So while you update password upon expiration, your updated password reflects across all systems. Hence, you are allowed to access different systems using the new password.

Now while you are using Git Bash or Tortoise Git client or any other Git client tool for cloning, pushing the source code, you may face an issue that incorrect username/password or invalid username/password and due to this you are not allowed to perform any operations on remote repositories. This issue happens due to the local cache of your credentials into your system. Therefore you need to update your password in the local git client tool or system cache.

Here you will see how to clear old password in local cache of your git client and update the new password.

Git Bash

If you are using Git Bash CLI (Command Line Interface) tool, then you can use the following commands to clear the old password for Git repository. The following commands should be executed one at a time.

git config --unset-all credential.helper
git config --global --unset-all credential.helper
git config --system --unset-all credential.helper

The above commands will clear password from local cache.

So once your credentials (username/password) got clear from the local cache, when you try to push or clone the code, it will open a popup and ask for username & password or even you can use token for accessing remote repository. Use your latest or updated password to clone or push the changes to the repository.

password update git

This is about how you reset or update password for your Git client using Git Bash tool.

Tortoise Git Client

Here I will show you how you can update or reset your Git client password using Tortoise Git client tool. Make sure you have the Tortoise Git client tool installed in your system.

Generally you do right click anywhere and you do clone, push, pull, etc. using the Tortoise Git client tool.

Mouse hover the TortoiseGit then click on Settings.

In the Settings window, click on Saved Data then click on Clear for Authentication data. So, it will clear your old or current username and password or credentials saved into your local cache.

Now when you try to pull, push any changes to the remote repository then it will show you a popup and ask for credentials.

Now you have two options – use token or use browser to sign in to your Git account. I am using browser to authenticate my account. So, I clicked on Sign in with your browser.

A browser with login page will ask you for your username and password. Once you type your Git’s username and password and if authentication successful, then you will see the similar message as shown below.

Now you can close the browser and your push/pull/clone will be successful.

There are other Git client tools which can be used to clear the old password from the local cache of your system.

Hope you got an idea how to update your Git client password.

Leave a Reply

Your email address will not be published. Required fields are marked *