Rilcon42 Rilcon42 - 6 months ago 38
Git Question

git configuration to prompt for username on push

I have several git repositories on my computer. Some of them ask for my username every time I push, but others do not.

Why is this? Is there a global git configuration or setting I need to change?

Running linux mint if it matters.


To be sure about your git local repository status, inside your git local repository folder type command

git config --list

to see affected configuration.

We have 2 type of Git configuration:

Global (If you use 2 or more than git servers, I don't recommend this way)

git config --global "Mr. Joe"
git config --global ""

Repository level (If you use many git servers, It's recommended), at repo R1:

git config "Mr. Rilcon"
git config ""

at repo R2:

git config "Mr. Happy"
git config ""

Then you will avoid problems, Git won't ask you username or password many times.