How-to enable public/private keys for github.
Create a private key and add it to your agent.
TLDR:
$ ssh-keygen -t ed25519 -C "[email protected]"
I had to type passphrase.
This created:
~/.ssh/
id_ed25519
id_ed25519.pub
Verify ssh-agent is running.
$ ps -Af | grep ssh-agent
robert 212144 212080 0 14:49 ? 00:00:00 /usr/bin/ssh-agent /usr/bin/im-launch env GNOME_SHELL_SESSION_MODE=ubuntu /usr/bin/gnome-session --session=ubuntu
robert 213375 212558 0 14:57 pts/0 00:00:00 grep --color=auto ssh-agent
Add your new private key.
$ ssh-add ~/.ssh/id_ed25519
$ xclip -selection clipboard < ~/.ssh/id_ed25519.pub
Navigate github to reach the page that lets you add an ssh key. I named mine “desktop”. Paste in the key from the clipboard.
Had to add the following to ~/.gitconfig
## Github
[url "ssh://[email protected]/"]
insteadOf = https://github.com/
git push
now works without prompts. I may have to enter passphrase
when the agent decides to ask me.