Check if ssh-agent is running, generate and add key with the commands below.
# check if ssh agent is running
eval "$(ssh-agent -s)"
# list all keys configured with ssh agent
ssh-add -l
# generate a new key
ssh-keygen -t ed25519 -C "your_email@example.com"
# add key to ssh agent
ssh-add ~/.ssh/id_ed25519
Copy the content of the public key id_ed25519.pub
to clipboard.
cat ~/.ssh/id_ed25519.pub
Give it a title like “My Laptop” then paste the content of id_ed25519.pub
into key and click [Add SSH key]
Test if the key was properly configured by using the command below.
ssh -T git@github.com
# if successful you will see a similar message
# Hi <username>! You've successfully authenticated, but GitHub does not provide shell access.