Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

git credential.helper does not store username password

I am writing a deployment script which clones a git repo and then performs other tasks such as fetch etc .I have run this

git config --global credential.helper cache

The username and password for cloning step are provided by an expect script. But these details are not cached as it should be.The script again prompts for user details

I cannot use ssh as I am using Visual Studio Online

like image 936
iamads Avatar asked Apr 01 '15 21:04

iamads


1 Answers

You can create a file ~/.netrc like this:

machine github.com
login <username>
password <password>

and Git will use it. Another option is git-credential-store:

git config --global credential.helper store

Credentials are saved to ~/.git-credentials.

like image 51
Zombo Avatar answered Oct 21 '22 07:10

Zombo