How to Git clone without entering password again and again

File .gitconfig can be use to acheive the same, We can store username and password in it. To do that there are two ways.

1. Manual method

Consider your linux username and home directory is navdeepd2, then create a file at below location

vim /home/navdeepd2/.gitconfig

Paste below content in that file.

[user]
email = [email protected]
name = [email protected]
password = yourgitpasswordhere
[credential]
helper = store

Change the email/name/pass accordingly.

At end run git clone as per your URL.

git clone https://example.com.com/someurl.git

2. Via command

git config –global credential.helper store
git config –global user.name “[email protected]
git config –global user.email “[email protected]
git config –global user.password “yourgitpasswordhere”

Once all 3 commands are executed, you can check the .gitconfig ,it will have those value which you just entered.

cat ~/.gitconfig

At end run git clone as per your URL.

git clone https://example.com.com/someurl.git