我刚刚设置了一个专用于 GitLab 的 Ubuntu 64 位服务器。
我已经成功安装了 GitLab,除了使用 Git 客户端(SmartGit)的 SSH 连接之外,一切似乎都正常。
我单击“克隆”,然后插入 ssh git URL:
git@mydomain.test:root/firstproject.git
当我单击“下一步”时,它给了我这个错误:
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
但问题仍然存在。
我什至使用 Web 浏览器的 Gitlab 控制面板将其添加为“密钥”。
我曾尝试重新启动 GitLab 和 SSH,但没有帮助。HTTP 方法有效,但如果我同时提交和推送大量文件,则会出现错误:
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)
我不需要解决这两个问题,我只需要让其中一个完全正常工作。