Home Git Credential Caching
Post
Cancel

Git Credential Caching

Having a local git repo configured, I haven’t yet set up ssh authentication. Instead I use HTTPS with a username and password. It can be tiresome typing in the login credentials over and over, so I typically cache the credentials with a reasonable timeout.

1
2
git config --global user.name "patrick"
git config --global credential.helper 'cache --timeout=3600'

I also make sure my .git/config contains the username so I don’t need to type that in over and over.

1
https://<USERNAME>@github.com/path/to/repo.git

More helpful information can be found here.

This post is licensed under CC BY 4.0 by the author.