Gitlab: cloning (via ssh) on a new installation fails: "The remote end hung up unexpectedly",

Switching to a new repo in a new gitlab installation (6.0.1) fails with

Access denied. fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. 

But ssh -vT git @ www.my.gitlab.eu works.

+7
gitlab
source share
3 answers

When

sudo -u git -H / home / git / gitlab-shell / bin / check

I got:

 Check GitLab API access: FAILED. code: 503 Check directories and files: /home/git/repositories: OK /home/git/.ssh/authorized_keys: OK 

In gitlab-shell.log, I found an html answer that said:

MISTAKE

The requested URL could not be found

The following error occurred while trying to get the URL: http://my.gitlab.eu//api/v3/internal/check

Unable to determine IP address from my.gitlab.eu hostname

DNS server is back:

Name error: domain name does not exist. This means that the cache could not resolve the host name specified in the URL. Check if the address is correct.

Your cache administrator - admin@example.com.

I edited the gitlab-shell configuration file

 /home/git/gitlab-shell# sudo -u git -H editor config.yml 

like this

 # Url to gitlab instance. Used for api calls. Should end with a slash. #gitlab_url: "http://my.gitlab.eu/" gitlab_url: "http://123.xxx.xxx.xx" 

The trailing slash causes the slash to break in the api call, despite the hint in the comment. In my case, dns failed to resolve. So now I am using the ip address and it works.

+8
source share

Disable selinux.

 setenforce 0 

Also set SELINUX to the permission file in / etc / selinux / config.

Then go to this answer: stack overflow

0
source share

Verify your credentials. Only the owner can commit to the main branch. If your account is of type Developer, you need to create a new branch, and a member whose owner will merge your branch with the main branch.

0
source share

All Articles