If you were asked for user and password the first time, surely you are using the repository with HTTPS.
The first thing is to find out how you are storing this password. Enter the command:
git config --system --list
See what it says on the line credential.helper
. If the value is manager:
credential.helper=manager
The user and password were stored in the Windows credentials. To remove from there, go to:
Control Panel → User Accounts → Credential Manager → Manage Windows Credentials
Locate the credential https://github.com and erase it.
Now, if the value is store:
credential.helper=store
You’re using Git’s own user manager and password. To remove from there, use the command:
git config --global --unset credential.helper
After this, the next pull
/push
will ask user and password again.
The password is only requested on
PULL
andPUSH
, if you have not registered the hash of the keys on the git hub site. I believe that if so, just do not register the key.– William Aparecido Brandino
In fact it does not ask for a password for anything (neither pull or push). I have no key on github, for this reason in my Ubuntu it always asks for user and password. I remember that in windows, when I pushed the first, a window was opened where I put user and password.
– GustavoBDR