Skip to main content

How to generate SSH keys for Github

Updated 1 min readMarkdown
Part of seriesToday I Learned

It's been maybe 3 years since I last used git. And it feels like, "hello, world" as I try to relearn the workflow.

The plan was to push a repository for my notes in Github when I encountered the following error message. This was resolved by connecting with SSH.

remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.
remote: Please see https://github.blog/2020-12-15-token-authentication-requirements-for-git-operations/ for more information
fatal: Authentication failed for 'https://github.com/****

Connect with SSH

  1. Generate new SSH key
    ssh-keygen -t ed25519 -C "your_email@example.com"
    
  2. Copy the SSH key to clipboard
    pbcopy < ~/.ssh/id_ed25519.pub
    
  3. Go to Github -> Settings -> SSH and GPG Keys -> New SSH Key 02.png
  4. Set the Title and paste the SSH key
  5. Add SSH key

Reference

Connecting to GitHub with SSH

No comments yet. Be the first to comment.