.http = Net::HTTP.new(url.host, url.port) 10.http.use_ssl = (url.port == 443) 11.http.verify_mode = OpenSSL::SSL::VERIFY_NONE if http.use_ssl? 12.request = Net::HTTP::Get.new(url.request_uri) 13.http.start {|http| http.request(request) } 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) }
我这里不交代如何在Nginx中设置SSL证书。论文网
第四步,Nginx中的gitlab配置, 也许对大家有用,仅供参考:
[plain] view plaincopyprint? 01.File Edit Options Buffers Tools Help 02.# GITLAB 03.# Maintainer: @randx 04.# App Version: 4.0 05. 06.upstream gitlab { 07. server unix:/home/git/gitlab/tmp/sockets/gitlab.socket; 08.} 09. 10.server { 11. listen *:443; # e.g., listen 192.168.1.1:80; 12. ssl on; 13. ssl_certificate /etc/nginx/sites-available/server.crt; 14. ssl_certificate_key /etc/nginx/sites-available/server.key; 15. 16. server_name localhost; 17. #ubuntu1204-dell source.myserver.com; # e.g., server_name source.example.com; 18. root /home/git/gitlab/public; 19. 20. 21. 22. # individual nginx logs for this gitlab vhost 23. access_log /var/log/nginx/gitlab_access.log; 24. error_log /var/log/nginx/gitlab_error.log; 25. 26. location / { 27. # serve static files from defined root
上一页 [1] [2] [3] [4] 下一页
|