我刚刚设置了一个专门用于GitLab的Ubuntu64bit服务器。
我已经成功地安装了GitLab,除了使用Git客户端( SmartGit )的SSH连接之外,一切似乎都正常。
单击"Clone",然后插入ssh git URL:
git@mydomain.test:root/firstproject.git当我单击"Next“时,它会给出以下错误:
Please check the repository URL.
Could not read from remote repository.: /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'initialize': getaddrinfo: Name of service not know (SocketError)
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'open'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'block in connect'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'timeout'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'connect'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'do_start'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'start'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'get'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'allowed?'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'validate_access'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in 'exec'
from /user/local/lib/ruby/2.0.0/net/http.rb:878:in '<main>'
Please make sure you have the correct access rights and the repository exists.我试图生成一个SSH密钥并将其放入/home/git/.ssh/config中,但问题仍然存在。
我甚至在网页浏览器中使用Gitlab控制面板将其添加为"key“。
我尝试过重新启动GitLab和SSH,但是没有帮助。HTTP方法可以工作,但如果同时使用commint&push多个文件,则会给出一个错误:
The remote end hung up unexpectedly
The remote end hun up unexpectedly
RPC failed; result=22, HTTP code = 411
Counting objects: 89, done
Delta compression using up to 8 threads.
Total 88 (delta 12), reused 0 (delta 0)我不需要解决这两个问题,我只需要让其中一个充分发挥作用。
发布于 2013-10-27 02:22:48
从堆栈跟踪来看,gitlab-shell似乎无法用GitLab的web解析服务器自己的主机名来验证存储库的权限。尝试登录到服务器并运行:
nslookup mydomain.test
其中"mydomain.test“是您在gitlab.yml中的gitlab_url:设置中使用的主机名。如果在输出中看到类似于** server can't find mydomain.test的错误,这就是您的问题。
如果是这样的话,您可以通过以下两种方法来解决这个问题:
gitlab_url更改为使用http://localhost/而不是外部可路由的域名。发布于 2013-10-26 11:33:00
确保这不是配置问题,正如第3324期中所报告的那样
sudo -u git -H vim /home/git/gitlab/config.yml 和改变: gitlab_url:http://yourhost to gitlab_url:http://yourhost/ 最后的斜杠是很重要的。
https://stackoverflow.com/questions/19605691
复制相似问题