Skip to content

Instantly share code, notes, and snippets.

@andreabradpitto
Created October 12, 2022 15:18
Show Gist options
  • Save andreabradpitto/0f9f77ca0b525188fc878420cca02532 to your computer and use it in GitHub Desktop.
Save andreabradpitto/0f9f77ca0b525188fc878420cca02532 to your computer and use it in GitHub Desktop.
A simple guide that explains how to correctly clone a GitHub Gist via SSH

How to clone a Gist via SSH

Rules to follow
  1. The user is git (as with "standard" www.github.com GitHub repositories)

  2. The domain is gist.github.com

  3. The author's name is not present

  4. As usual, a .git suffix needs to be added


Example

For instance, if the URL to clone is:

https://gist.github.com/andreabradpitto/5383d118958cda9a38e60e53d0dd59b0

then the command to run is:

git clone git@gist.github.com:5383d118958cda9a38e60e53d0dd59b0.git
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment