0 votes
1 view
in Devops and Agile by (16.9k points)
Whenever I try to push into my repo git asks for both username & password.

I have no problem in re-entering my password each time but the problem is in entering a username. I use https to clone my repository.

So, how can I configure git so that it doesn't ask for username on each git push?

I am new to Linux but IIRC in Windows git push only asks for the password.

1 Answer

0 votes
by (22.3k points)

This command should do the magic: 

$ git config --global credential.https://github.com.username <your_username>

This works on a site by site basis and modifies your global git config.

In order to see the changes, use:

$ git config --global --edit

...