Git credential Store

According to https://cinhtau.net/2018/02/06/configure-git-credentials/

git config --global credential.helper 'store --file ~/.my-credentials'
CopyBash

The authentication is cached for 900 seconds (15 minutes), see also git Credential Cache.

Now I have to fill the credential storage with my gitlab access token.  Using git credentials command to store the authentication data.  Important is to use the file storage by omitting the respective option.  git will read the input from stdin and stores it to the given file. A blank line ends the input from stdin.

git credential-store --file ~/.my-credentials store
protocol=https
host=git[lab|hub].com
username=my_username
password=a-magic-password
Afficher les commentaires