gitlab服务搬迁之后出现的客户端git clone的报错问题

发布于 2021-11-24 22:39:29 字数 1177 浏览 925 评论 5

os:ubuntu 12

gitlab:5.3.0

error info:

/usr/local/lib/ruby/2.0.0/net/http.rb:878:in `initialize': No route to host - connect(2) (Errno::EHOSTUNREACH)
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878: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:877: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:60: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>'
fatal: The remote end hung up unexpectedly
内网服务器在搬迁之前是能正常提供服务,但是搬迁之后,修改了IP地址,其他都没有变化

服务启动之后,web的访问没有任何问题,但是客户端远程git clone工程就会报错。

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

甜柠檬 2021-11-26 15:33:27

引用来自“钱总”的答案

我遇到的错误跟你差不多,求解答

root@AY13102515245237131fZ:/home/git/gitlab-shell# ./bin/check 
Check GitLab API access: /usr/local/lib/ruby/2.0.0/net/http.rb:878:in 
`initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878: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:877: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:29:in `check'
        from ./bin/check:11:in `<main>'
终止放荡 2021-11-26 02:26:37

搜索git安装目录下面的所有文件,查询可能有的以前服务器IP地址的文件,全部替换,即可!

瀞厅☆埖开 2021-11-25 11:03:11

我找到原因,就是需要把所有需要修改IP的地方都修改一次

哑剧 2021-11-25 07:29:05

我遇到的错误跟你差不多,求解答

root@AY13102515245237131fZ:/home/git/gitlab-shell# ./bin/check 
Check GitLab API access: /usr/local/lib/ruby/2.0.0/net/http.rb:878:in 
`initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878: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:877: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:29:in `check'
        from ./bin/check:11:in `<main>'
因为看清所以看轻 2021-11-25 02:21:14

引用来自“钱总”的答案

我遇到的错误跟你差不多,求解答

root@AY13102515245237131fZ:/home/git/gitlab-shell# ./bin/check 
Check GitLab API access: /usr/local/lib/ruby/2.0.0/net/http.rb:878:in 
`initialize': Connection refused - connect(2) (Errno::ECONNREFUSED)
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878:in `open'
        from /usr/local/lib/ruby/2.0.0/net/http.rb:878: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:877: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:29:in `check'
        from ./bin/check:11:in `<main>'
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文