Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+3 votes
3 views
in DevOps and Agile by (19.4k points)
edited by

I want to use a push and pull automatically in GitExtension, without entering my user and password in a prompt, every time.

So how can I save my credentials in GIT?

1 Answer

+4 votes
by (27.5k points)
edited by

First run the following command: 

$ git config credential.helper store

All you need to do now is pull.

$ git pull

Now you have to provide a username and password, remember that these details will then be remembered later. 

Note that this will store your username and password in a plain text file at ~/.git-credentials. Anyone can open it and read it.

For better understanding about these commands go through the following crash course on git that will help you to understand git well

 

Git config password-How to save username and password in GIT?
Intellipaat-community
by (29.3k points)
To Set the cache to timeout after 1 hour (setting is in seconds) you could use this command as well after turning on the credential helper.
git config --global credential.helper 'cache --timeout=3600'

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...