Issue
I have a bot hosted on another computer. I have cloned the repo onto the second computer and whenever I want to update the files in it, I do a git pull
.
At this point, it asks for my credentials (username and password).
However, recently Github has been sending me emails saying that this method is becoming deprecated and tells me to use a personal access token instead.
I've generated one but can't figure out where to put it or how to use it.
It seems to work in place of my password, but is there a way to make it stop asking for my credentials?
Solution
It seems to work in place of my password, but is there a way to make it stop asking for my credentials?
If you are using the latest Git, you can use:
git config --global credential.helper manager-core
printf "protocol=https\nhost=github.com\nusername=<me>\npassword=<my_token>" |\
git-credential-manager-core store
Then, Git won't ask for your credentials anymore.
On Linux/Mac, you might have to install GCM (Git-Credential-Manager-Core) first.
On Linux, add:
sudo apt-get install libsecret-1-0
git config --global credential.credentialStore secretservice
Answered By - VonC