Unable to create gists since HTTPS Switch #10

Closed
drnic opened this Issue Nov 5, 2010 · 12 comments

Comments

Projects
None yet
6 participants
Owner

drnic commented Nov 5, 2010

Unable to create gists any more since github switched to https....

-John

Any idea whats up here? I see you did a push 2 days ago, but I am stil getting errors, only know they say "error" rather then "gist created"

-John

Owner

drnic commented Nov 10, 2010

Sorry, all I had time to do was try a few things (and add a better error message). Not sure that's missing/wrong at the moment.

Yea, this started right after github switched to https only, so I assume the http API simply was turned down...

anybody get this working yet?

niko commented Dec 2, 2010

Same here. Too bad. Guess we should pester the github guys to finally provide a public API for create/fork/delete instead hacking into gists.

http://develop.github.com/p/gist.html

timkelty commented Dec 2, 2010

After some guess work I got this work:
Here's my gist.rb:

http://gist.github.com/725238

Tim,

There might have been an issue, at least in my tests, with your regex. I forked your project corrected, and send a pull to you.

timkelty#1 (comment)

Thanks again for your hard work, you certainly did the heavy lifting!

John

timkelty commented Dec 2, 2010

Oh I'm sure there was, that was just a quick shot to get it working, thanks!

niko commented Dec 2, 2010

I think the regexp line should look like this:

body.match(/"repo":"(\w+)"/)[1]

Thanks for the hard work, Tim.

Niko.

roder commented Dec 18, 2010

I don't think the above fix is correct, because it just short-circuits the HTTPS support that GitHub requires. GitHub's nginx server was returning a 400, because Net::HTTP.post_form was just sending a plain text HTTP request to an HTTPS port.

This commit provides support for HTTPS: https://github.com/roder/github-tmbundle/commit/42881cb5ed1d423a4f33844569c61e55988a9cef

Confirmed that @roder's commit fixes it. Thanks!

Owner

drnic commented Jan 28, 2011

Ok, merged in roder's fork.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment