Skip to content

GitLab

  • Menu
    • Projects Groups Snippets
      Help
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #3292

Closed
Open
Created 12 years ago by Administrator@rootOwner
  • New issue

  • Report abuse

  • New issue

  • Report abuse

Would be great to add support for self-signed certificates

Closed

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:inblock in connect' from /usr/local/lib/ruby/1.9.1/timeout.rb:54:in timeout' from /usr/local/lib/ruby/1.9.1/timeout.rb:99:intimeout' from /usr/local/lib/ruby/1.9.1/net/http.rb:799:in connect' from /usr/local/lib/ruby/1.9.1/net/http.rb:755:indo_start' from /usr/local/lib/ruby/1.9.1/net/http.rb:744:in start' from /home/git/gitlab-shell/lib/gitlab_net.rb:42:inget' from /home/git/gitlab-shell/lib/gitlab_net.rb:28:in check' 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

Linked issues
...

    Related merge requests

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: jamierytlewski

      Ours isn't even self-signed and I had the same problem. Thanks for the code.

      By Administrator on 2013-03-22T19:46:47 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: jpscharf

      @jamierytlewski I was having the same problem with a legitimate CA certificate from StartSSL, I was able to fix the problem by creating a unified certificate that was simply the contents of my certificate and the CA's certificates.

      By Administrator on 2013-03-23T02:49:18 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: akzhan

      @mrPsycho Support for self-signed certificates just landed to gitlab-shell.

      By Administrator on 2013-03-23T13:26:36 (imported from GitLab project)

    • Administrator
      Administrator @root · 12 years ago
      Owner

      Created by: mrPsycho

      Thanks!

      By Administrator on 2013-03-23T15:30:48 (imported from GitLab project)

    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: Vincent14

      Is there any tutorial to use this with Nginx? Do I have to use Nginx to put my certs? Or only in gitlab-shell conf?

      I'm a beginner and I can't find any way to make it working. Any help is welcome.

      By Administrator on 2013-10-19T18:39:37 (imported from GitLab project)

    • Administrator
      Administrator @root · 11 years ago
      Owner

      Created by: Razer6

      No these things all happen inside nginx config. Look for example this tutorial: http://www.startssl.com/?app=42

      By Administrator on 2013-10-19T19:42:55 (imported from GitLab project)

    • You're only seeing other activity in the feed. To add a comment, switch to one of the following options.
    Please register or sign in to reply
    0 Assignees
    Assign to
    Milestone
    No milestone
    None
    None
    Time tracking
    Due date
    None
    None
    0
    Labels
    None
    Assign labels
    • No matching results
    • Manage project labels
    Confidentiality
    Not confidential

    You are going to turn on confidentiality. Only team members with at least Reporter access will be able to see and leave comments on the issue.

    Lock issue
    Unlocked
    participants
    Reference:

    Menu

    Projects Groups Snippets
    Help