RedpointArchive / phabricator

A Docker image that runs Phabricator, an open source software engineering tool
https://hub.docker.com/r/redpointgames/phabricator/
307 stars 98 forks source link

phabricator hosted repositories not created - permission denied #8

Closed sheershoff closed 9 years ago

sheershoff commented 9 years ago

Initialization Error
Pull of "DC" failed: Command failed with error #128! COMMAND git init --bare -- '/var/repo/DC' STDOUT (empty) STDERR fatal: cannot mkdir /var/repo/DC: Permission denied

4dda92483808:~ # ls -lia /var/repo
total 8
130770 drwxr-xr-x  2 root root 4096 Jun  7 12:45 .
    15 drwxr-xr-x 91 root root 4096 Jun  7 12:34 ..
4dda92483808:~ # ps auxw|grep Reposit
git        684  0.2  3.1 149232 32740 ?        Ss   12:34   0:02 php /srv/phabricator/libphutil/scripts/daemon/exec/exec_daemon.php PhabricatorRepositoryPullLocalDaemon

Not sure where one should correct the permissions. If I manually do git init --bare '/var/repo/DC' it then says it can't write to .git/hooks. What should I do? I'm new to docker.

hach-que commented 9 years ago

You need to have the repo storage mapped to somewhere outside the Docker instance, otherwise you'll lose your repos next time the Docker image starts.

If /var/repo is mapped, then check the permissions on the folder it is mapped to. It will need to have the same ownership and group as the UID / GID of the user inside the Docker container which means a UID / GID of 2000 / 2000.

You should be able to set the ownership of the folder outside the container with something like chown 2000:2000 /path/to/repo.

hach-que commented 9 years ago

Closing this as there has been no response.

sheershoff commented 9 years ago

Thank you, this worked.

yashvekaria commented 8 years ago

Thank you @hach-que , it worked for me as well.