首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >gitlab6.0,错误连接被拒绝-连接(2) (Errno::ECONNREFUSED)

gitlab6.0,错误连接被拒绝-连接(2) (Errno::ECONNREFUSED)
EN

Stack Overflow用户
提问于 2013-08-26 14:36:07
回答 3查看 9.9K关注 0票数 5

我安装了gitlab

我在阅读完后安装了gitlab

我在浏览器上用gitlab制作存储库,

我设了~/.ssh/config

$ git push origin master

我得到了Erorr

代码语言:javascript
复制
/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: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: Could not read from remote repository.

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

我已经读过了,但是我无法解决这个错误。

(也许我的英语很差,所以我想念阅读)

ssh -vT相同误差

代码语言:javascript
复制
...
...
debug1: Sending env LC_CTYPE = UTF-8
debug1: Sending env LANG = ja_JP.UTF-8
/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:24:in `discover'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:77:in `user'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:82:in `username'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:36:in `exec'
    from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: client_input_channel_req: channel 0 rtype eow@openssh.com reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2560, received 3808 bytes, in 0.4 seconds
Bytes per second: sent 7260.5, received 10799.9
debug1: Exit status 1

为什么使用Ruby?

哪个设置使用Ruby?如何解决此错误?

附注:

我发现谁用红宝石。

/home/git/.ssh/authorized_keys

代码语言:javascript
复制
command="/home/git/gitlab-shell/bin/gitlab-shell key-4",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa .....

所以我命令

代码语言:javascript
复制
$ /home/git/gitlab-shell/bin/gitlab-shell key-4

我也犯了同样的错误

代码语言:javascript
复制
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:24:in `discover'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:77:in `user'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:82:in `username'
    from /home/git/gitlab-shell/lib/gitlab_shell.rb:36:in `exec'
    from /home/git/gitlab-shell/bin/gitlab-shell:16:in `<main>'

所以,我读过/home/git/gitlab-shell/lib/gitlab_net.rb脚本。

gitlab_net.rb连接到

gitlab_net.rb连接到

https://my-server/api/v3/internal/discover?key_id=5

但是我没有为https设置,所以这是

This webpage is not available

http://my-server/api/v3/internal/discover?key_id=5可以连接到服务器。

我就快到了。

安装ssl?

EN

回答 3

Stack Overflow用户

发布于 2013-08-28 00:14:16

如我所见,在/home/git/gitlab/config.yml中可能有一些小错误,如下所示:

gitlab_url:"http://gitlab.somedomain.com:8080/

此地址可能不正确,因为gitlab-shell通过http协议向Gitlab本身发送请求,并使用此变量进行连接。

票数 1
EN

Stack Overflow用户

发布于 2013-11-22 12:08:18

你也许应该设置:

代码语言:javascript
复制
gitlab_url: to http://localhost/

与: 127.0.0.1您的-gitlab-url一样重要,否则:内部/发现等将收到401

更新:请参阅:https://github.com/gitlabhq/gitlabhq/issues/4730#issuecomment-26332619使用

代码语言:javascript
复制
gitlab_url: to http://127.0.0.1

应该工作得很好

票数 0
EN

Stack Overflow用户

发布于 2014-08-17 15:44:48

检查nginx是否运行正常。

sudo nginx -t

可能存在“检测到一个重复的默认服务器”之类的问题,并且需要删除该默认文件。

修复错误后,发出命令

sudo service nginx restart

/home/git/gitlab下重新运行check命令

sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/18446683

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档