How to clone GitHub Gist via SSH

If you’re working with GitHub you definitely should consider Gists for smaller pieces of code, like scripts.

As soon as you start you might want to commit to Gists using SSH, and GUI provides such option:

But if you try to clone Gist using this link it will fail:

Even if you could to clone your regular GitHub repos you might want to double-check git config, keys and permissions:

As you can see, everything is fine but it still doesn’t work. I was really confused before solution was proposed here.

To tell the long story short, you have to use

git clone git@github.com:7cb9ca510695027b0fd2f811a70825e1.git

..instead of

git clone git@gist.github.com:7cb9ca510695027b0fd2f811a70825e1.git

and it works just as it has to:

I hope this info will be useful for you, and if you need any help feel free to use contact form on the main page.