DEV Community

Cover image for Set SSH keys for Github in ubuntu or linux mint
Nabin Ale
Nabin Ale

Posted on • Edited on

Set SSH keys for Github in ubuntu or linux mint

Github Installation

sudo apt install ppa-purge
sudo ppa-purge ppa:git-core/ppa
sudo apt purge git
Enter fullscreen mode Exit fullscreen mode

Configuring the git

git config --global user.name "<your_github_username>"
git config --global user.email <your_email@example.com>
Enter fullscreen mode Exit fullscreen mode

NOTE: To check the user.name and user.email set or not
git config -l

Keys generation

Step 1: Generate new ssh keys

ssh-keygen -t ed25519 -C "your_email@example.com"
Enter fullscreen mode Exit fullscreen mode

Step 2: Add a new ssh keys

cat ~/.ssh/id_ed25519.pub
Enter fullscreen mode Exit fullscreen mode

Output will be something like this

ssh-ed25519
NAAAC3Nza*********jPRyyNVIdgj
your_email@example.com

Step 3: Copy output and paste in setting > SSH and GPG keys > new SSH key
Image description

Top comments (0)