Ricky
Ricky

Reputation: 11

Gitlab was unable to access your Gitolite system

I installed GitLab on Ubuntu server 12.
I followed this steps: http://blog.compunet.co.za/gitlab-installation-on-ubuntu-server-12-04/

Everything seems to be right... but when I try to create a new project, I get the error message:

Gitlab was unable to access your Gitolite system.

I ran the diagnostic tool ("bundle exec rake gitlab:app:status RAILS_ENV=production")

(in /home/gitlab/gitlab) Starting diagnostic
config/database.yml.............exists
config/gitlab.yml.............exists
/home/git/repositories/...........exists 
/home/git/repositories/ is writable?........YES 
remote: Counting objects: 12, done. 
remote: Compressing objects: 100% (8/8), done. 
Receiving objects: 100% (12/12), 1.12KiB, done. 
Resolving deltas: 100% (1/1), done. 
remote:Total 12 (delta 1), reused 0 (delta 0) 
Can clone gitolite-admin?..............YES 
UMASK for .gitolite.rc is 0007?............YES
 /home/git/share/gitolite/hooks/common/post-receive exists?............YES

Finished

The log on admin area only shows:

ERROR -> /home/gitlab/gitlab/tmp/gitlabhq-gitolite-1348050652/gitolite

The config/gitlab.yml file is ok.
The permissions on repositories are just like the tutorial (section 3 - permissions).
I even tried to remove the lock...

What would you advise to troubleshoot this?

Upvotes: 1

Views: 4673

Answers (3)

Ethan T
Ethan T

Reputation: 1480

I was able to resolve this issue on my server by following the installation instructions section titled "Disable StrictHostKeyChecking for localhost and your domain" and adding a new section for my gitolite host, which was set to the IP address of the server rather than localhost. Open:

/etc/ssh/ssh_config

And add the lines:

Host [gitolite hostname/IP here]
    StrictHostKeyChecking no
    UserKnownHostsFile=/dev/null

(replace the bracketed part with the appropriate hostname/IP)

It's already in the setup steps, but I had skipped it earlier because I didn't understand what it was suggesting. Otherwise, the SSH client tries to show the yes/no prompt to accept a new hostname and the Ruby backend interprets that as a failure to connect to gitolite.

Upvotes: 0

pbdiode
pbdiode

Reputation: 31

If it helps, I had a very similar situation happen, except in my gitlab log I had the following error:

ERROR -> Pull error -> unable to clone gitolite-admin repo

I had compared the commit of the gitolite fork metioned, and found that the changes there were already in place in my version of gitlab.

I ended up stopping the gitlab related services, deleting the contents of the gitlab tmp directory, then restarted the gitlab related services.

Afterwards, everything appeared to be working fine.

Upvotes: 2

VonC
VonC

Reputation: 1323973

If the issue comes from permission regex fixed in this commit of this gitolite fork, you can have a look at "GitHub Tip: download commits as patches":

Your commit can be downloaded by adding a .patch at the end of its url: patch.

That way, you can apply it to your current gitolite source (without even using git itself, just by using the patch command)

Upvotes: 1

Related Questions