Skip to content

Instantly share code, notes, and snippets.

@immkavin-ranks
Created July 15, 2024 16:39
Show Gist options
  • Save immkavin-ranks/9291ea03676e70ee033a779e099684be to your computer and use it in GitHub Desktop.
Save immkavin-ranks/9291ea03676e70ee033a779e099684be to your computer and use it in GitHub Desktop.
create and add ssh key to github
# Generate a new SSH key
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"
# Start the SSH agent
eval "$(ssh-agent -s)"
# Add the SSH key to the agent
ssh-add ~/.ssh/id_rsa
# Copy the SSH key to the clipboard
clip < ~/.ssh/id_rsa.pub
# Test the SSH connection
ssh -T git@github.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment