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
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
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With