Credential helper for Git (Rocky Linux 8)?

Hi,

I’m currently preparing a course on Git. In my daily work I’m using GitLab and GitHub with SSH keys. I’d like to show various authentication methods to my students, namely access tokens with GitHub. When running VSCode under Windows, there’s an integrated credential helper which allows you to store your access token(s) securely so you don’t have to type the stuff in on every git push operation.

Is there a similar thing for Git under Rocky Linux 8, to be used on the command line ? My course is rather bone-headed and down to earth, which means I’m using the command line and Vim as an editor, no fancy GUI stuff like VSCodium or the likes.

Any suggestions ?

Hi Niki,

I had lived through the pain of figuring that out myself some time ago :slight_smile:
Long story short is, using the Git credential helper on Linux is not very useful,
especially with VSCode which somehow doesn’t work that nice with password popups and so on.

In the end I got to the conclusion that the best option is to use a ssh keypair, which does not (yes unfortunately) have a password, then it works pretty well.
In the best case you are even using a password manager which has a ssh-agent (KeepassXC, 1Password, …) to serve the passwordless private key to VSCode (ssh).

In case of only using the commandline, you sure can use ssh keypairs with a password, still always nice to use a password manager (for me 1Password has a cli client for that).

And on top of that, you can directly use the ssh keypair for signing as well! :slight_smile:

1 Like

GNOME DE has password manager that can store the passphrases. Hence, when you log in to GNOME session the manager can load ssh key(s) to agent-like process (started by the session). That obviously does not help, if one does not log into (GNOME) GUI session. I’d guess that other DE’s have something similar.

I haven’t used tokens (nor VSCod*).

1 Like

Yeah, I’m already using SSH keys myself. It’s only to show a different authentication method to my students. And I can’t use any X11 tools, since we’re all working on VMs without a GUI.