Toni Toni - 1 year ago 48
Git Question

Git DOES NOT require username and password. How can I change it to do so?

It seems as though the common scenario is to be in a safe computer, and receive prompts for username and password when pushing branches to GitHub from RStudio.

I have the reverse problem. I don't remember how I set it up, but it is not asking for username and password, pushing committed branches automatically.

How can I reverse the settings so as to be prompted every time?

Answer Source

First, do:

git config credential.helper

If that gives you any output, then you have a credential helper defined, and it could be caching your credentials.

To disable the helper, do:

git config --unset credential.helper

Depending on where the helper was defined, you may need to also include one of --system, --global, or --local. E.g.:

git config --global --unset credential.helper