Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
0 votes
2 views
in DevOps and Agile by (19.4k 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 (27.5k 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

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...