Skip to content
This repository has been archived by the owner on Nov 18, 2021. It is now read-only.

ERROR: the remote "origin" looks funny. #31

Open
suewonjp opened this issue Jun 7, 2016 · 3 comments
Open

ERROR: the remote "origin" looks funny. #31

suewonjp opened this issue Jun 7, 2016 · 3 comments

Comments

@suewonjp
Copy link

suewonjp commented Jun 7, 2016

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?

@pyhedgehog
Copy link

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

@mbostock
Copy link
Owner

mbostock commented Jun 7, 2016

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());

@suewonjp
Copy link
Author

suewonjp commented Jun 8, 2016

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants