error
GitLab

GitLabでエラーが出たのでメモ

More than 3 years have passed since last update.
$ git clone git@gitlab.server:user/repo.git
Cloning into 'app'...
/usr/local/lib/ruby/2.0.0/net/http.rb:878:in `initialize': getaddrinfo: Name or service not known (SocketError)
    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: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>'
fatal: Could not read from remote repository.

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

⇒GitLabを設置してるサーバーのhosts設定を修正すればいけた・ω・!

127.0.0.1 gitlab.server

忘れてた・ω・`

ちなみにgitlab-shellのconfig.ymlでgitlab_urlの最後の/が入っていない場合にも同じようなエラーがでるみたいです。

config.yml
gitlab_url:"http://gitlab.server/"

参考:https://github.com/gitlabhq/gitlab-shell/issues/17