Git securely with a GitHub SSH URL example

GitHub SSH URL Example

HTTPS is a popular mechanism for communicating across the Internet, but security minded organizations tend to prefer SSH. User-generated SSH keys provide a higher level of encryption and confidentiality.

In GitHub, users enable SSH in two parts. First, create GitHub SSH keys that uniquely identify their account. Then, register the public half of the private key pair in the user’s GitHub account.

Once these two steps are completed, the user can use the GitHub SSH URL to clone their repository of interest. All subsequence Git operations will occur over SSH.

Configure GitHub for SSH

Many believe secure shell (SSH) is the safest way to connect to GitHub. Here’s a list of SSH tutorials that show you how to do it:

Follow these tutorials and you’ll learn to Git over SSH fast.

Where is a GitHub SSH URL?

To find the GitHub SSH URL for a given repo, go to the repository’s landing page and click on the green Code button. This presents three separate options to connect to Git:

  1. a GitHub SSH URL;
  2. a GitHub HTTPS URL; and
  3. a GitHub CLI link.

GitHub Clone over SSH

Choose the GitHub SSH URL option and then copy the provided text string to your clipboard. It should look like this:

[email protected]:cameronmcnz/spring-boot-examples.git

This link can then be used with the git clone command.

The operation takes place over a secure connection. Once you clone the repository, continue to use Git as you normally would to version your progress and tag your milestones. Every time you push, pull or fetch to remote repository, it all occurs over a secure GitHub SSH URL.


Find the GitHub SSH URL on the landing page of the repository you wish to clone.