gistup icon indicating copy to clipboard operation
gistup copied to clipboard

ERROR: the remote "origin" looks funny.

Open suewonjp opened this issue 8 years ago • 3 comments

When I first launched gistup and tried to get a personal access token, I got the following error message.

ERROR: the remote "origin" looks funny.
I was expecting something like

  [email protected]:123456789.git

but instead the remote URL is

  https://gist.github.com/suewonjp/6cb1c64274069a60286972085e234696.git

so I’m giving up. Sorry.

What do you think I am missing?

suewonjp avatar Jun 07 '16 05:06 suewonjp

Clone using ssh to be able to update. First of all - what command you are running in what context?

pyhedgehog avatar Jun 07 '16 15:06 pyhedgehog

That error message doesn’t appear to be generated by gistup. It looks like you’re trying to run gistup-open or gistup-rename in a Gist git repository that you cloned manually, rather than one that was created using gistup.

When you create a Gist with gistup, it uses the git protocol to sync with GitHub, like so:

git remote add --track master origin [email protected]:6cb1c64274069a60286972085e234696.git

Whereas if you clicked the “Clone in HTTPS” button on the Gist, you would have done something like this:

git clone https://gist.github.com/6cb1c64274069a60286972085e234696.git

We could possibly make gistup-open and gistup-rename more tolerant and allow either HTTPS or Git protocol URLs by relaxing the regex, e.g. gistup-open:L55:

var match = /^git@gist\.github\.com:([0-9a-f]+)\.git$/.exec(stdout = stdout.trim());

mbostock avatar Jun 07 '16 16:06 mbostock

Thank you for kind explanations

What mbostock assumes is correct. I exactly did that.

Well, I think it would be better if the tool accepts HTTPS URL too.

suewonjp avatar Jun 08 '16 00:06 suewonjp