How to restrict Github permissions on Windows? (To ask for password every time)

Asked

Viewed 240 times

2

Hello,

I need the password requested in every commit. Currently the password is saved and I don’t need to type it. I think I saved this password somehow (actually I didn’t even know what I was doing when I set up...).

Note: I am using Windows (in my Ubuntu everything is ok).

  • The password is only requested on PULL and PUSH, 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.

  • 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.

1 answer

0


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.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.