Whist GitHub has guides for using its service from the command line within OSX, it doesn’t completely spill the beans for using the command line within Linux.
Here’s a quick how-to on how I managed to get my Linux machine (running Ubuntu and Gnome) to store my Github credentials within the Keystore, allowing me to push my code to GitHub without having to generate a personal access token every 15 minutes - and also avoiding storing my credentials in plaintext.
First things first, crack open a terminal and smash the following keys:
sudo apt-get install libgnome-keyring-dev sudo make --directory=/usr/share/doc/git/contrib/credential/gnome-keyring git config --global credential.helper /usr/share/doc/git/contrib/credential/gnome-keyring/git-credential-gnome-keyring
You’re basically done now. Next time you push to GitHub, prepare to enter your username and password/access token for the last time.