#293 new
Brian Tully

"Gist It" not working for me

Reported by Brian Tully | January 28th, 2011 @ 05:40 PM

As a recent convert to git from svn, I'm loving GitX so far. Many, many thanks for your time and effort on making the conversion to git much less painful for us Mac GUI addicts!

One of the GitX features I was most excited about was the "Gist It" integration with github. However, I can not get it to work at all. Each time I try I get the following error:

Pasting to Gistie failed :(.

In terms of my GitX preferences, I have "Enable 'Gist It'" checked as well as "Confirm creation of Gists".

I've tried to Gist it with the option "Make Gists public" checked and unchecked. Both give the same error.

In my .gitconfig I have both my github username and token set correctly.

Any idea why the Gist It function is not working?

Thanks again,
Brian

Comments and changes to this ticket

  • Ben Moss

    Ben Moss May 31st, 2011 @ 06:11 PM

    When I click 'gist it' it appears to work, but then links me to an apparently random gist. Might it be because the project I am working on is private?

  • Ben Moss

    Ben Moss May 31st, 2011 @ 06:11 PM

    When I click 'gist it' it appears to work, but then links me to an apparently random gist. Might it be because the project I am working on is private?

  • brotherbard

    brotherbard May 31st, 2011 @ 07:04 PM

    • Assigned user set to “Pieter de Bie”

    Github changed to use https for it's URLs which broke gisting in GitX.

    I have an updated fork with this change (and many others) you can download at: https://github.com/brotherbard/gitx/downloads

    Also there is work being done on this fork that includes my fix: https://github.com/laullon/gitx

  • Brian Tully

    Brian Tully May 31st, 2011 @ 07:18 PM

    brotherbard - I've downloaded your updated fork at https://github.com/brotherbard/gitx/downloads and still am having the same issue. I've downloaded both GitX v0.7.1 and the GitX Nov-17-2010.zip.

    I still get the "Pasting to Gistie failed :(."

  • brotherbard

    brotherbard May 31st, 2011 @ 09:44 PM

    GitX Nov-17-2010.zip is the binary to download. Just to make sure you are running it there should be a sidebar on the left with the branches and remotes in it.

    The patch I added fixed Ben Moss's problem where no gist is created and then a link to a random gist is added (actually the most recent public gist). Do you have any firewall tools like Little Snitch that might be blocking GitX/github?

  • Brian Tully

    Brian Tully May 31st, 2011 @ 10:37 PM

    thanks. yeah, GitX Nov-17-2010.zip is the one I downloaded and have been running. Little Snitch is running but GitX is allowed all connections. No other firewall tools are running. I tried both private and public gists and both gave me the same "Pasting to Gistie failed :(" error.

  • brotherbard

    brotherbard June 1st, 2011 @ 08:18 PM

    Check the Console log for the error message. GitX logs the error returned from github.

  • Brian Tully

    Brian Tully June 1st, 2011 @ 10:13 PM

    Interesting. In the console log I see the source of the html page as it would appear on github. So github is returning the html page source and GitX is saying the pastie failed and interprets the html page source as an error?

  • brotherbard

    brotherbard June 1st, 2011 @ 11:02 PM

    GitX scrapes the page looking for a link that matches "gist/<gist#>/edit" and then uses that to get the gist number. If there is an error github returns the All Gists page and you see a list of the most recent public gists and there is no edit link.

    The html page that is returned, is it for your gist or is it a list of recent gists?

    When you look at the "My Gists" section of github's gist page do you see the gists you have been creating but that GitX has said have failed?

  • brotherbard

    brotherbard June 1st, 2011 @ 11:05 PM

    Sorry, the matching text is "gists/<gist#>/edit"

  • Brian Tully

    Brian Tully June 1st, 2011 @ 11:42 PM

    No, "gists/<gist#>/edit" is not in the html source. But the gist # is, as is the contents of the gist. The edit link would only be available if I was logged in, no? How would GitX know if I am logged in on gist.github.com (which I am via Google Chrome)?

    Seems like GitX should parse the page for "gist: <gist#>" as I see that 3 times within the source. Alternatively, it could parse the page for https://gist.github.com/gists/&lt;gist#>/download

    Here is the gist that went through but that GitX reported as failed:

    https://gist.github.com/1001230

    Thanks again for your willingness to look into this :)

  • brotherbard

    brotherbard June 2nd, 2011 @ 12:24 AM

    Ah yes, not being logged in would be a problem.

    I can't just use "gist: <gist#>" because if there is an error github returns the All Gists page which has several of those and none of them would be the right gist. The download link seems like a better choice for now. As a quick fix: in history.js line 110 change "edit" to "download". Let me know if that fixes it.

    Since I made that change Github has added an API for gists so maybe I should look at updating GitX to use that instead.

  • Brian Tully

    Brian Tully June 2nd, 2011 @ 12:44 AM

    AWESOME! Changing line 110 in history.js from /edit to /download did the trick. Many thanks brotherbard! :D

  • brotherbard

    brotherbard June 2nd, 2011 @ 02:54 AM

    You're welcome, glad that fixed it. :)

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

GitX is the nice-looking gitk clone for OS X

People watching this ticket

Pages