An SSH key is the most reliable way to authenticate with GitHub from within Eclipse. An SSH key is generally specific to the computer on which it is created. This tutorial assumes:

Create an SSH key pair

  1. Open Terminal (macOS) or Command Prompt (Windows).
  2. Enter the command: ssh-keygen
  3. Leave the default answers for each prompt (just press Enter/Return at each prompt).

Give GitHub a copy of the public key

By default, the SSH key pair is stored in the .ssh folder in the user folder. For example:

macOS hides folders that start with a dot (.). Either navigate to the user folder and show hidden files or open the .ssh folder directly.

Windows shows folders that start with a dot. Navigate to the .ssh folder.

Open the public key (the one with the extension pub) in a text editor (ex: TextEdit/NotePad). If the file has the phrase "PRIVATE KEY" at the top, close it and open the other file.

The link below leads directly to the GitHub new SSH key screen. Alternatively, the GitHub Settings menu can be accessed from the top right corner of the website. The option is “SSH and GPG keys.”

The Title is usually the computer associated with the key. The Key type is Authentication Key. The Key is the text shown when the public key file is opened.

SSH key generation video

The 2 links below are to the same video of an SSH key being generated and shared with GitHub. The YouTube version might show ads (YouTube’s, not mine). The Google Drive version should not show ads.


Comment on Make an SSH key for GitHub