Using SSH Git: key lost after system restart?
0
votes
1
answer
3390
views
I am setting up Git usage on Raspbian.
This worked OK:
cd .ssh
ssh-keygen -t rsa -b 4096 -C "name@asdf.com"
eval $(ssh-agent -s)
ssh-add ./id_rsa_rpi
After I created the keys locally, I went to GitHub and added a public key there.
It all worked OK, I cloned a few repositories without problems. Confirmed it all with ssh -vT git@github.com
However, after a shutdown yesterday and a powerup today, git pull
didn't work:
git@github.com: Permission denied (publickey).
I had to repeat the following:
eval $(ssh-agent -s)
ssh-add .ssh/id_rsa_rpi
Now it works again.
How do I make this permanent?
Asked by Danijel
(186 rep)
Nov 11, 2021, 10:35 AM
Last activity: Jan 14, 2025, 04:02 PM
Last activity: Jan 14, 2025, 04:02 PM