• 请不要在回答技术问题时复制粘贴 AI 生成的内容
larkifly
V2EX  ›  程序员

搭建 gitlab 遇到 ssl 问题

  •  
  •   larkifly · Sep 18, 2014 · 7228 views
    This topic created in 4342 days ago, the information mentioned may be changed or developed.
    搭建方式gitlab+nginx:

    现在的情况是,nginx配置成http方式,可以通过ssh方式push代码,nginx配置成https方式,通过ssh方式push代码,就会出现如下错误:
    /usr/local/lib/ruby/2.0.0/net/http.rb:918: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/2.0.0/net/http.rb:918:in `block in connect'
    from /usr/local/lib/ruby/2.0.0/timeout.rb:52:in `timeout'
    from /usr/local/lib/ruby/2.0.0/net/http.rb:918:in `connect'
    from /usr/local/lib/ruby/2.0.0/net/http.rb:862:in `do_start'
    from /usr/local/lib/ruby/2.0.0/net/http.rb:851:in `start'
    from /home/git/gitlab-shell/lib/gitlab_net.rb:62:in `get'
    from /home/git/gitlab-shell/lib/gitlab_net.rb:17:in `allowed?'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:59:in `validate_access'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:23:in `exec'
    from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'

    如果通过https push代码,就会出现fatal: could not read Username for 'https://git.******': No such file or directory

    求大神指教
    7 replies    2014-09-19 20:49:34 +08:00
    orzfly
        1
    orzfly  
       Sep 18, 2014
    都说了 certificate verify failed 了嘛……

    https://github.com/gitlabhq/gitlab-shell/blob/master/config.yml.example#L16
    这行改成 true 试试……
    mhtt
        2
    mhtt  
       Sep 18, 2014
    同遇到过这个问题,处理办法是
    把 `/home/git/gitlab/config/gitlab.yml` 里面的 https: true 同时修改端口 port: 443 (默认是80)
    larkifly
        3
    larkifly  
    OP
       Sep 18, 2014
    @orzfly
    @mhtt

    好使了,但现在有个问题,
    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights
    and the repository exists.

    这个问题怎么解决啊
    mengzhuo
        4
    mengzhuo  
       Sep 19, 2014
    @larkifly 请学好英语再学编程
    larkifly
        5
    larkifly  
    OP
       Sep 19, 2014
    @mengzhuo 现在是linux能push,windows下出现这个错误
    mengzhuo
        6
    mengzhuo  
       Sep 19, 2014
    windows 用git bash的话,你确定你的私钥能登入?
    larkifly
        7
    larkifly  
    OP
       Sep 19, 2014 via Android
    @mengzhuo 私钥在http情况下能登入并且push,https不行,有没有可能是https的ssl证书是自己生成的,所以push的时候git检查这个ssl返回的错误了
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3009 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 46ms · UTC 03:34 · PVG 11:34 · LAX 20:34 · JFK 23:34
    ♥ Do have faith in what you're doing.