Skip to content
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

Option to ignore certificate errors #61

Closed
onionjake opened this issue Jul 1, 2014 · 6 comments
Closed

Option to ignore certificate errors #61

onionjake opened this issue Jul 1, 2014 · 6 comments
Labels
enhancement New feature or request

Comments

@onionjake
Copy link

My Gitlab uses HTTPS with a self-signed certificate, so when I try to connect using this gem I get this error:

/usr/lib/ruby/1.9.1/net/http.rb:800:in `connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError)

Is there a way to ignore the certificate error? If not, could one be added?

@NARKOZ
Copy link
Owner

NARKOZ commented Jul 8, 2014

Currently there is no way to ignore cert errors.

@NARKOZ
Copy link
Owner

NARKOZ commented Jul 8, 2014

Planned to be implemented in next version.

@barraq
Copy link
Contributor

barraq commented Aug 6, 2014

Hi @NARKOZ, I just encountered the same issue as the one mention by @onionjake. I therefore started looking at your code and I saw that you are using HTTParty.

Actually, HTTParty provides some settings to cope with certificates (https://github.com/jnunemaker/httparty/blob/master/lib/httparty/connection_adapter.rb#L140), for instance you can ignore unsigned ones.

A good approach would be to let users provide HTTParty options when creating a client or a session. What do you think?

I just forked your project, I'll try this option out and let you know.

@chriscool
Copy link

Please implement this feature!
Thanks in advance!

@barraq
Copy link
Contributor

barraq commented Aug 29, 2014

hey @chriscool I did implement it, check at https://github.com/barraq/gitlab.git
I did the pull request but @NARKOZ didn't accept it yet :p

@chriscool
Copy link

Yeah @barraq, I saw that you implemented it.
Thank you for that.

I am going to use your version, but I would rather have @NARKOZ accept
your pull request.

jvanbaarsen added a commit that referenced this issue Sep 30, 2014
introduce HTTParty-configuration, fix #61
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants