xxxxxxxxxx
git config --global credential.helper store # Configuring Git to store credentials
# Changing the password
git ls-remote https://github.com/your/repo.git # Attempt a remote operation to prompt credential input
git config --global user.name "Your Name"
git config --global user.password "new_password"
# Verifying the update
git ls-remote https://github.com/your/repo.git # You should no longer be prompted for password
xxxxxxxxxx
On macOS, you can use
$ git config --global credential.helper osxkeychain
A username and password prompt will appear with your next
Git action (pull, clone, push, etc.).
For Windows, it's the same command with a different argument:
$ git config --global credential.helper wincred
xxxxxxxxxx
To update your credentials, go to Control Panel -> Credential Manager -> Generic Credentials. Find the credentials related to your git account and edit them to use the updated password.
Update Local Git Password on Windows
xxxxxxxxxx
1. Search for "credential manager" in your "Search Windows" section in the Start menu.
2. Then from the Credential Manager, select "Windows Credentials".
3. Credential Manager will show many items including your outlook and GitHub repository under "Generic credentials".
4. You click on the drop down arrow on the right side of your Git:
and it will show options to edit and remove.
If you remove, the credential popup will come next time when you fetch or pull.
Or you can directly edit the credentials there.