I've just set up an Ubuntu 64bit server dedicated to GitLab.
I have successfully installed GitLab and everything seems to work except for the SSH connection using a Git client ( SmartGit ).
I click on "Clone", then I insert the ssh git URL:
[email protected]:root/firstproject.git
When I click on "Next" it gives me this error:
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.
I have tried to generate an SSH key and put it in /home/git/.ssh/config but the problem remains the same.
I've even added it as "key" using the Gitlab control panel from web browser.
I have tried to restart GitLab and SSH but it didn't help. The HTTP method works, but gives me an error if I commint&push lot of files at the same time:
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)
I don't need to fix both problems, I just need to have one of them fully working.
From the stack trace, it looks like gitlab-shell can't resolve the server's own hostname in DNS to verify repository permissions with GitLab's web API. Try logging into the server and running:
nslookup mydomain.test
Where "mydomain.test" is the hostname you're using in the gitlab_url: setting in gitlab.yml. If you see an error like ** server can't find mydomain.test in the output, this is your problem.
If so, you can fix this by either:
gitlab_url to use http://localhost/ instead of the externally-routable domain name.mydomain.test that points to 127.0.0.1.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With