Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Remove credentials from Git

I'm working with several repositories, but lately I was just working in our internal one and all was great.

Today I had to commit and push code into other one, but I'm having some troubles.

$ git push appharbor master error: The requested URL returned error: 403 while accessing https://[email protected]/mitivo.git/info/refs?service=git-receive-pack fatal: HTTP request failed 

There is nothing I can do, that would bring the password entry again.

How can I reset the credentials on my system so Git will ask me for the password of that repository?

I have tried:

  • git config --global --unset core.askpass

in order to unset the password

  • git config credential.helper 'cache --timeout=1'

in order to avoid credentials cache...

Nothing seems to work; does anyone have a better idea?

like image 547
balexandre Avatar asked Mar 13 '13 09:03

balexandre


People also ask

How do I remove a Git user from Windows?

Go to Windows Credential Manager , open the Windows Credentials tab, locate git:https://github.com , open the entry, and click Remove . This will remove your GitHub credentials from the credential manager.

How do I clear my Git credentials on Mac?

On Mac, use the command git credential-osxkeychain erase . OR remove manually from keychain from Applications → Utilities → Keychain Access. Then remove the github.com keychain. Then use push; it will ask for the keychain access; then deny.

Where are Git credentials stored?

The default path for the git credential store is $HOME/. git-credentials (or $XDG_CONFIG_HOME/git/credentials, if the previous location doesn't exist).


1 Answers

If this problem comes on a Windows machine, do the following.

  • Go to Credential Manager

    • in German, it is called: Anmeldeinformationsverwaltung
    • in French, it is called: Gestionnaire d'identification
    • in Polish, it is called: Menedżer poświadczeń
    • in Portuguese, it is called: Gerenciador de Credenciais
    • in Russian, it is called: Диспетчер учётных данных
    • in Spanish, it is called: Administrador de credenciales

    Go to Credential Manager

  • Go to Windows Credentials

  • Delete the entries under Generic Credentials

    Go to Windows Credentials and Delete the entries under Generic Credentials

  • Try connecting again. This time, it should prompt you for the correct username and password.

like image 189
Venkataramana Madugula Avatar answered Sep 21 '22 03:09

Venkataramana Madugula