Setup Git with SSH keys
mainGenerate an RSA SSH key for Git authentication and add it to the ssh-agent.
#!/bin/bash
email="contact@alex-d.fr"
# Generate a new SSH key
ssh-keygen -t rsa -b 4096 -C "${email}"
# Start ssh-agent and add the key to it
eval $(ssh-agent -s)
ssh-add ~/.ssh/id_rsa
# Display the public key ready to be copy pasted to GitHub
cat ~/.ssh/id_rsa.pub