-
Notifications
You must be signed in to change notification settings - Fork 89
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to authorise #8
Comments
GitHub ate my comment, but I essentially said:
Verify that's correct, and try regenerating your API key. If you want to debug the "check" request, run this:
|
I tried both of these and got:
Strangely when going to the url provided in the debug in my browser it returns fine with this JSON response: {
"status": "OK",
"droplets": [
{
"id": 123456,
"name": "512VPS",
"image_id": 12345,
"size_id": 63,
"region_id": 2,
"backups_active": null,
"ip_address": "127.0.0.1",
"status": "active"
}
]
} Obviously I've removed anything sensitive but it all seems to work fine when I use the browser. Any other things I can do to debug this for you? |
Previously, we were catching everything in a lazy way. Now, it only catches the exception related to Faraday parsing the response, which in the case of DigitalOcean is this not authorized page.
What does I just pushed something which should help with the authorize error. I wasn't being explicit with the exception to raise that error to the user, so perhaps something else happened there. If you don't mind, could you clone this repo and then Appreciate the help! |
Looks like that's the problem, but not sure how to fix it. The latest master gives this:
It's the same error as above but I didn't include the full stack trace in the first instance. A quick google gives this as an answer from StackOverflow and this is the reference it gives for fixing it on OS X. I've had a look through your code and it seem to hand off all the actual HTTP stuff to the digital_ocean gem but (with my limited ruby knowledge) then hands it off to Faraday. By the looks of it that's a pretty weel used HTTP library which shouldn't have a problem with root CAs. Everything seems to be at the latest stable versions. I've not got enough specific knowledge of ruby to figure out where the problem is coming in between all these gems. Any ideas? |
@matto1990 does |
It returns |
Can you try curling I've seen a similar issue with SSL. Check out this Twitter thread. |
If you're looking for a verbose SSL output, try this:
|
The curl command works fine both on the homepage URL and the api.digitalocean.com url. I wont post the log because it's all normal. |
Following this guide fixed the problem. It was something wrong with my install, not your program. Thanks for the help, and for the tool 👍 |
Great to hear Matt. Glad you brought it up here so other people can find it. |
I'm attempting to authorise but I keep getting this error:
These values are defiantly correct and have no extra whitespace around them. I've tried installing the gem both as my normal user and also using sudo.
I'm running OS X 10.8.2, ruby 1.9.3p194 and gem 1.8.25. I've verified that I can access Digital Ocean by browsing to the website and pinging the from the command line.
Any ideas what I'm doing wrong?
The text was updated successfully, but these errors were encountered: