defunkt/gist

Feature: Option to show SSH url for cloning a Gist

zachriggle opened this issue · 0 comments

Thanks!

Thanks @defunkt for making such a great tool!

One thing that I've always wanted is the ability to easily update an existing Gist, without using the web UI.

Problem

Similar to #291 from 2018, I think it would be useful for Gist to have the ability to clone a URL.

The process of converting a Gist URL into a clone-able Git URL is simple. In fact, no conversion is needed for regular HTTPS clones -- but then pushing the changes back up is annoying because of HTTPS auth.

Suggestion

I suggest adding a new flag, --ssh that works with e.g. -l/--list. A separate idea might be to emit a full git clone git@... line that can by copy-pasted into the CLI.

  • Assume our Gist is https://gist.github.com/65756b5ac1d031e4e56697889b8c748b
  • The SSH clone URL then becomes what is shown below. The prefix URL scheme changed, but importantly a (required!) .git suffix was added.
    • git clone git@gist.github.com:65756b5ac1d031e4e56697889b8c748b.git