Blog coding and discussion of coding about JavaScript, PHP, CGI, general web building etc.

Monday, October 24, 2016

remove credentials from git

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://gavekortet@appharbor.com/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 repo?

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?

Answer by Munim for remove credentials from git


If you are authenticated using your key pair, you can deleting or moving your private key, or stopping the key agent and trying.

Answer by patthoyts for remove credentials from git


The git credential cache runs a daemon process which caches your credentials in memory and hands them out on demand. So killing your git-credential-cache--daemon process throws all these away and results in re-prompting you for your password if you continue to use this as the cache.helper option.

You could also disable use of the git credential cache using git config --global --unset credential.helper. Then reset this and you would continue to have the cached credentials available for other repositories (if any). You may also need to do git config --system --unset credential.helper if this has been set in the system config file (eg: Git for Windows 2).

On Windows you might be better off using the manager helper (git config --global credential.helper manager). This stores your credentials in the Windows credential store which has a Control Panel interface where you can delete or edit your stored credentials. With this store, your details are secured by your Windows login and can persist over multiple sessions. The manager helper included in Got for Windows 2.x has replaced the earlier wincred helper that was added in Git for Windows 1.8.1.1. A similar helper called winstore is also available online and was used with GitExtensions as it offers a more GUI driven interface. The manager helper offers the same GUI interface as winstore.

Extract from Windows manual detailing the Windows credential store panel:

Open User Accounts by clicking the Start button Picture of the Start button, clicking Control Panel, clicking User Accounts and Family Safety (or clicking User Accounts, if you are connected to a network domain), and then clicking User Accounts. In the left pane, click Manage your credentials.

Answer by Liviu M. for remove credentials from git


Remove this line from your .gitconfig file located in the windows's currently loged in user folder.

[credential]  helper = !\"C:/Program Files (x86)/GitExtensions/GitCredentialWinStore/git-credential-winstore.exe\"  

This worked for me and now when I push to remote it asks for my password again.

Answer by aaafly for remove credentials from git


retype:

$ git config credential.helper store  

and then you will be prompt to enter your credential again.

WARNING

Using this helper will store your passwords unencrypted on disk

Quelle: https://git-scm.com/docs/git-credential-store

Answer by damix911 for remove credentials from git


I found something that worked for me. When I wrote my comment to the OP I had failed to check the system config file:

git config --system -l  

shows a

credential.helper=!github --credentials  

line. I unset it with

git config --system --unset credential.helper  

and now the credentials are forgotten.

Answer by Fares for remove credentials from git


In our case, clearing the password in the user's .git-credentials file worked for us.

c:\users\[username]\.git-credentials  

Answer by Yoan Pumar for remove credentials from git


You can remove the line credential.helper=!github --credentials from the following file C:\Program Files\Git\mingw64\etc\gitconfig in order to remove the credentials for git

Answer by Himanshu Aggarwal for remove credentials from git


Try using below command -

git credential-manager

Here you can get various options to manage your credentials (check below screen)

enter image description here

Or You can even directly try this command -

git credential-manager uninstall

This will start prompting for passwords again on each server interaction request. Cheers!

Answer by Mourya for remove credentials from git


I faced the same issue as the OP, in my case when i ran the command

$ git config --system --list  

it showed

credential.helper=manager  

when ever i perform git push it was taking my old username which i set long back and i wanted to use new git hub account to push changes .I later found that my old git hub account credentials was stored under Control Panel > User Accounts > Credential Manager > Manage Windows Credentials

Manage Windows Credentials

I just remove this credentials and when i performed git push it asked me for my github credentials and it worked like a charm.

I hope some one will find this useful.

Answer by Venkataramana Madugula for remove credentials from git


If this Problem comes on a Windows Machine do the following

  • Go to Credential Manager
  • Go to Windows Credentials
  • Delete the entries under Generic Credentials
  • Try connecting again.This time , it should prompt you for the correct username and password.

Go to Credential Manager

Go to Windows Credentials and Delete the entries under Generic Credentials


Fatal error: Call to a member function getElementsByTagName() on a non-object in D:\XAMPP INSTALLASTION\xampp\htdocs\endunpratama9i\www-stackoverflow-info-proses.php on line 72

Related Posts:

0 comments:

Post a Comment

Popular Posts

Fun Page

Powered by Blogger.