Would be great to add support for self-signed certificates
Created by: mrPsycho
When i tried to check installation of new 5.0 i got:
root@ubuntu:/home/git/gitlab# sudo -u git -H /home/git/gitlab-shell/bin/check Check GitLab API access: /usr/local/lib/ruby/1.9.1/net/http.rb:799:in
connect': SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed (OpenSSL::SSL::SSLError) from /usr/local/lib/ruby/1.9.1/net/http.rb:799:in
block in connect' from /usr/local/lib/ruby/1.9.1/timeout.rb:54:intimeout' from /usr/local/lib/ruby/1.9.1/timeout.rb:99:in
timeout' from /usr/local/lib/ruby/1.9.1/net/http.rb:799:inconnect' from /usr/local/lib/ruby/1.9.1/net/http.rb:755:in
do_start' from /usr/local/lib/ruby/1.9.1/net/http.rb:744:instart' from /home/git/gitlab-shell/lib/gitlab_net.rb:42:in
get' from /home/git/gitlab-shell/lib/gitlab_net.rb:28:incheck' from /home/git/gitlab-shell/bin/check:11:in
'
so i had to add string not to check certificate at /home/git/gitlab-shell/lib/gitlab_net.rb from:
http = Net::HTTP.new(url.host, url.port) http.use_ssl = (url.port == 443) request = Net::HTTP::Get.new(url.request_uri) http.start {|http| http.request(request) }
to: http = Net::HTTP.new(url.host, url.port) http.use_ssl = (url.port == 443) http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? request = Net::HTTP::Get.new(url.request_uri) http.start {|http| http.request(request) }
And all now is fine