1.Create an SSH Key
- First, we need to see if you have an Ed25519 algorithm SSH key
already installed. Type this:
ls ~/.ssh/id_ed25519.pub
- if “No such file or directory”, then you have to create a new
SSH key (Do not include the brackets)
ssh-keygen -t ed25519 -C <youremail>
- press Enter, password not required
2. Link your SSH key with Github
cat ~/.ssh/id_ed25519.pub
copy the output
- go to GitHub > Settings > SSH and GPG keys > new SSH key
and paste the output of the cat command
3. Set your repository to SSH
Go to your repository, click "Code", then click
the "SSH" button and copy "git@github.com:username/repo.git"
and update the URL of your origin remote like this:
git remote set-url origin git@github.com:username/repo.git
You can check if you have added the remote as HTTPS or SSH using:
git remote -v
ssh-add ~/.ssh/id_rsa
# CREATE SSH
1. ssh-keygen
2. cd ~/.ssh
3. cat id_rsa.pub
4. copy key
# CONNECT TO GITHUB
1. settings
2. SSH and GPG keys
3. SSH keys -> new SSH key
$ clip < ~/.ssh/rsa.pub
$ clip < ~/.ssh/id_ed25519.pub
# Copies the contents of the id_ed25519.pub file to your clipboard
ssh-keygen -b 2048 -t rsa // generate the keys
ssh-agent -s // start the aggent
ssh-add ~/.ssh/id_rsa // add private key to ssh
eval "$(ssh-agent -s)"
$ ssh-add ~/.ssh/id_ed25519
> Generating public/private ed25519 key pair.