- git --version
git version 2.17.1
- sudo apt-get install libsecret-1-0 libsecret-1-dev
- cd /usr/share/doc/git/contrib/credential/libsecret
- sudo make
- git config --global credential.helper /usr/share/doc/git/contrib/credential/libsecret/git-credential-libsecret
- Next time Git asked for GitHub's username an password, just write your username and paste your token and they'll be stored in your keyring.
Thank you! Worked for me :)