Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • G gitlabhq1
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 21
    • Issues 21
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 12
    • Merge requests 12
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Packages & Registries
    • Packages & Registries
    • Package Registry
    • Infrastructure Registry
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • gpt
  • large_projects
  • gitlabhq1
  • Issues
  • #4774

Closed
Open
Created Aug 13, 2013 by Administrator@rootOwner

git's home in other than /home confuses some rake tasks.

Created by: sund

Due to work place procedures, I can't have git's home under /home as that is reserved for NFS home mounts. So, I put git's home under /usr/local/home but this is unexpected for the gitlab:backup:restore and gitlab:check rake tasks.

the gitlab:check script complains about the init script:


Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.

Not 100% sure how it is checking/verifying the init script but I believe it is because it is failing at my modification to the script I had to make: APP_ROOT="/usr/local/home/git/gitlab" .

I think adding the following (or something similar) to the init script would fix that:

gitHome=$(awk -F: -v v="git" '{if ($1==v) print $6}' /etc/passwd)
APP_ROOT="$gitHome/gitlab"

The gitlab:backup:restore task fails in a similar manner:


websites/helloworld ... [DONE]
Put GitLab hooks in repositories dirsls: cannot access /home/git/repositories/: No such file or directory
 [DONE]
done
Restoring uploads ... 

It should be noted that when this fails in the gitlab:backup:restore it fails to add the symlinks to the hooks in $gitHome/gitlab-shell/hooks/post-receive and setting some permissions on the $gitHome/repositories directory.

Again, this appears to be an issue with git's home directory being in an unexpected place. I don't have a suggestion on the ruby code to fix that.

This is done on redhat 6 but I would think fixing these git home issues would be beneficial to ubuntu as well.


sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
(in /usr/local/home/git/gitlab)

System information
System:     Red Hat Enterprise Linux Server release 6.4 (Santiago)
Current User:   git
Using RVM:  yes
RVM Version:    1.21.9
Ruby Version:   1.9.3p448
Gem Version:    2.0.5
Bundler Version:1.3.5
Rake Version:   10.0.4

GitLab information
Version:    5.4.0
Revision:   94a814d
Directory:  /usr/local/home/git/gitlab
DB Adapter: mysql2
URL:        https://fuquay.lib.unc.edu
HTTP Clone URL: https://fuquay.lib.unc.edu/some-project.git
SSH Clone URL:  [email protected]:some-project.git
Using LDAP: yes
Using Omniauth: no

GitLab Shell
Version:    1.4.0
Repositories:   /usr/local/home/git/repositories/
Hooks:      /usr/local/home/git/gitlab-shell/hooks/
Git:        /usr/bin/git


sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
(in /usr/local/home/git/gitlab)
Checking Environment ...

Git configured for git user? ... yes
Has python2? ... yes
python2 is supported version? ... yes

Checking Environment ... Finished

Checking GitLab Shell ...

GitLab Shell version >= 1.4.0 ? ... OK (1.4.0)
Repo base directory exists? ... yes
Repo base directory is a symlink? ... no
Repo base owned by git:git? ... yes
Repo base access is drwxrws---? ... yes
post-receive hook up-to-date? ... yes
post-receive hooks in repos are links: ... 
...
websites / helloworld ... ok

Checking GitLab Shell ... Finished

Checking Sidekiq ...

Running? ... yes

Checking Sidekiq ... Finished

Checking GitLab ...

Database config exists? ... yes
Database is SQLite ... no
All migrations up? ... yes
GitLab config exists? ... yes
GitLab config outdated? ... no
Log directory writable? ... yes
Tmp directory writable? ... yes
Init script exists? ... yes
Init script up-to-date? ... no
  Try fixing it:
  Redownload the init script
  For more information see:
  doc/install/installation.md in section "Install Init Script"
  Please fix the error above and rerun the checks.
Projects have satellites? ... 
...
websites / helloworld ... yes
Redis version >= 2.0.0? ... yes
Your git bin path is "/usr/bin/git"
Git version >= 1.7.10 ? ... yes (1.7.11)

Checking GitLab ... Finished
Assignee
Assign to
Time tracking