DEV Community

02-Ranjan
02-Ranjan

Posted on

2

Simplest way to set up SSH key for GitHub.

Prerequisites: -

  1. Git must be installed in your device. To see if you have git installed use the command: git -v
  2. You must have already configured your credentials (i.e. your email and username for git). If you haven't done so yet, use the following commands to set up your email and username: -

for email: - git config --global user.email "youremail@yourdomain.com"
for username: - git config --global user.name "Your Name"

If you have those done, let's move forward.

- Generating the SSH key: -

  1. copy the command: ssh-keygen -t ed25519 -C "your_email@example.com"
    and paste it in your (git bash) terminal.
    replace the dummy email with your own (preferably your GitHub account)

  2. If you wish to enter a pass phrase you can do so, But for this tutorial
    we will just keep it empty. Hit enter until you are able to enter a new
    command in your terminal.

- Copying the SSH key: -

  1. Use this command in your terminal: clip < ~/.ssh/id_ed25519.pub to copy your SSH key.

- Adding SSH key to your GitHub account: -

  1. Click on your profile (On the Top right) and open settings.

  2. Click on "πŸ”‘ SSh and GPG keys" on the left side under the access
    section.

  3. Click on "New SSH key"

  4. Give it a title (Anything you want)

  5. Paste your SSH key in "key" input field.

  6. Finally, click on "Add SSH key"

So, did you find it simple?

if you would like to learn more about the ssh key follow the link below to the official page of GitHub: -
[ https://docs.github.com/en/authentication/connecting-to-github-with-ssh/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent ]

Billboard image

Deploy and scale your apps on AWS and GCP with a world class developer experience

Coherence makes it easy to set up and maintain cloud infrastructure. Harness the extensibility, compliance and cost efficiency of the cloud.

Learn more

Top comments (0)

nextjs tutorial video

Youtube Tutorial Series πŸ“Ί

So you built a Next.js app, but you need a clear view of the entire operation flow to be able to identify performance bottlenecks before you launch. But how do you get started? Get the essentials on tracing for Next.js from @nikolovlazar in this video series πŸ‘€

Watch the Youtube series

Retry later