# How to generate SSH keys for Github

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.*
```cmd
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
```cmd
ssh-keygen -t ed25519 -C "your_email@example.com"
```
2. Copy the SSH key to clipboard
```cmd
pbcopy < ~/.ssh/id_ed25519.pub
```
3. Go to Github -> Settings -> SSH and GPG Keys -> New SSH Key
![02.png](https://cdn.hashnode.com/res/hashnode/image/upload/v1631945830498/78E2Ti6Jc.png)
4. Set the Title and paste the SSH key
5. Add SSH key

### Reference

[Connecting to GitHub with SSH](https://docs.github.com/en/github/authenticating-to-github/connecting-to-github-with-ssh)
