Skip to content

Configure SSH key for Git

Source: Notion | Last edited: 2024-10-23 | ID: 863c843a-e0c...


For Mac / Linux

Terminal window
# Create an SSH key
ssh-keygen -t rsa -b 4096 -C "your_email_address"
# Add SSH key to ssh agent
ssh-add -k ~/.ssh/id_rsa
# or
ssh-add -k id_rsa
# Copy public key to clipboard
pbcopy < ~/.ssh/id_rsa.pub
# Add SSH key to your GitHub account:
<https://help.github.com/en/enterprise/2.16/user/articles/adding-a-new-ssh-key-to-your-github-account>