Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@jzztf
Created April 20, 2019 00:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jzztf/dbef4ec27cf6266c33910dc314523b66 to your computer and use it in GitHub Desktop.
Save jzztf/dbef4ec27cf6266c33910dc314523b66 to your computer and use it in GitHub Desktop.
Configure Git Credentials

Configure Git Credentials

https://git-scm.com/book/en/v2/Git-Tools-Credential-Storage

# Config timeout by using cache
git config --global credential.helper cache --timeout=36000

# store forever
git config --global credential.helper 'store --file ~/.my-credentials'
git credential-store --file ~/.my-credentials store
# git will read the input from stdin and stores it to the given file.
protocol=https
host=gitlab.com
username=cinhtau
password=a-magic-password

#A blank line ends the input from stdin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment