How can I store Github token with Git Credential Manager on Ubuntu?

2k views Asked by At

With the new Git Credential Manager (GCM) how can I use it to store Github access token on Ubuntu? I have tried to read the usage text and it is not clear how one can store Github token using it.

1

There are 1 answers

0
VonC On BEST ANSWER

You can store it with:

printf "host=github.com\nprotocol=https\nusername=you\npassword=yourToken" | \ 
  git credential-manager-core store

Make sure git-credential-manager is in your $PATH.
Replace 'you' with your GitHub account name, and 'yourToken' by your GitHub token.