gist icon indicating copy to clipboard operation
gist copied to clipboard

Add option to update gist

Open r0ckarong opened this issue 6 years ago • 3 comments

I'm trying to use this as a pythonic replacement for https://github.com/defunkt/gist but this tool lacks the essential function to update an existing gist. When I run "gist edit <ID>" I just get an error message.

Cloning into 'f0b2f348a1508a9fa3ad3c7a8e5fd845'...
[email protected]: Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.
1533573244.774 ERROR[gist] [Errno 2] No such file or directory: 'f0b2f348a1508a9fa3ad3c7a8e5fd845'

The rest of the operations work fine and I have the token and editor configured.

I was hoping to get something like gist update <ID> <filename> that would simply use an (existing) file to update an existing Gist. I don't understand how this is not covered in this tool.

Are there any other ways I can simply update the contents of an existing Gist? Much appreciated.

r0ckarong avatar Aug 06 '18 16:08 r0ckarong

The error message indicates there is a problem with your public key -- have you added your SSH key to github?

jdowner avatar Aug 06 '18 16:08 jdowner

@jdowner I didn't before no. The other tool I used can manipulate this fine with just the token.

I've added it now and now editing / upload works. Piping from file into the editor however still does not. What is the proper way to edit an existing Gist with the contents from an existing file without manually going through editing?

Ideally something like

gist update <ID> -m <commit message> -d <updated description> <filename>

r0ckarong avatar Aug 06 '18 16:08 r0ckarong

Still we don't have the edit feature? (no editor, but from file ...)

wookayin avatar Apr 10 '19 23:04 wookayin