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

[pastacode lang=”markup” manual=”git%20clone%20git%40github.com%3A7cb9ca510695027b0fd2f811a70825e1.git” message=”” highlight=”” provider=”manual”/]

..instead of

[pastacode lang=”markup” manual=”git%20clone%20git%40gist.github.com%3A7cb9ca510695027b0fd2f811a70825e1.git” message=”” highlight=”” provider=”manual”/]

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.