Skip to content
Snippets Groups Projects

Add custom ssh port support and fix a small permission problem

Closed gitlab-qa-bot requested to merge github/fork/yin8086/fixInstall into master

Created by: yin8086

First about sudo chmod -R 750 /home/git/.gitolite/. When I first install gitlab as the Guide. The check program always say post-receive exists? ............NO. And I found that User GitLab can not even see the post-receive file. So I add this option and then the problem is solved. I don't know if there is better choice to fix this. Maybe somebody else have a better idea?

Second I add the custom SSH port support. In many VPS systems, the SSH port is sometimes not 22. So I think this is very important. After create the config file, the git will work correctly.

Merge request reports

Loading
Loading

Activity

Filter activity
  • Approvals
  • Assignees & reviewers
  • Comments (from bots)
  • Comments (from users)
  • Commits & branches
  • Edits
  • Labels
  • Lock status
  • Mentions
  • Merge request status
  • Tracking
  • Created by: nimf

    Did you add gitlab user into git group as it is said in installation document?

    sudo adduser --disabled-login --gecos 'GitLab' gitlab
    
    # Add it to the git group
    sudo usermod -a -G git gitlab

    because if you do and /home/git/.gitolite/ owned by git:git

    # Make sure the Gitolite config dir is owned by git
    sudo chmod 750 /home/git/.gitolite/
    sudo chown -R git:git /home/git/.gitolite/

    then gitlab is able to see post-receive hook:

    sudo -u gitlab ls -la /home/git/.gitolite/hooks/common
    total 16
    drwxrwxr-x 2 git git 4096 2013-01-17 10:51 .
    drwxrwxr-x 4 git git 4096 2013-01-16 11:27 ..
    -rwxr-xr-x 1 git git  432 2013-01-16 16:19 post-receive

    Setting 750 for all files inside .gitolite is not necessary.

    By Administrator on 2013-01-17T05:46:07 (imported from GitLab project)

    By Administrator on 2013-01-17T05:46:07 (imported from GitLab)

  • Created by: yin8086

    Oh, I do add the add gitlab user into git group. But maybe because I use a different command to creater use gitlab. adduser --shell /bin/bash --create-home --home-dir /home/gitlab gitlab

    Ok, I'll close this, and only add the ssh part

    By Administrator on 2013-01-17T06:08:29 (imported from GitLab project)

    By Administrator on 2013-01-17T06:08:29 (imported from GitLab)

  • Created by: yin8086

    My system is Centos. And the syntax of adduser is a litter different. This may be the problem.

    By Administrator on 2013-01-17T07:19:54 (imported from GitLab project)

    By Administrator on 2013-01-17T07:19:54 (imported from GitLab)

Please register or sign in to reply
Loading