Page MenuHomePhabricator

Help setting up git hosting
Closed, ResolvedPublic

Description

I am getting the following error on adding a repository:

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

I figured it could be because I have not set VCS Password but I can't find this option anywhere in the settings.
I have set diffusion.allow-http-auth to true and tried restarting.

Event Timeline

AdityaGoel assigned this task to epriestley.
AdityaGoel raised the priority of this task from to Low.
AdityaGoel updated the task description. (Show Details)
AdityaGoel added a project: Diffusion.
AdityaGoel added a subscriber: AdityaGoel.

Okay so I found where this setting was and have set a password now but I still get the same Initialization Error.

I am missing something in this step: "Adding these commands to sudoers will allow the daemon and webserver users to write to repositories as the daemon user."

I created a user "http-user" and have added the following line to sudoers "http-user ALL=(<myusername>) SETENV: NOPASSWD: /usr/bin/git-http-backend".

How do I make sure that the web server is running as http-user?

when you install a web-server, it would often create a dedicated user and use that.
The exact configuration is dependant on the web-server software you use.

avivey renamed this task from Where is VCS-Password setting? to Help setting up git hosting.Aug 3 2015, 10:45 AM
avivey removed epriestley as the assignee of this task.
avivey raised the priority of this task from Low to Needs Triage.
avivey edited projects, added Installing & Upgrading; removed Diffusion.

Thanks avivey. Let me explain what I want to do, then perhaps you could help me in the best way possible.

I wanted to enable Differential for all users and when I did that, it asked me for a repository. So, I figured I need to enable Diffusion. When I enabled Diffusion and configured it, I tried to add a repository. The error in my first post is the one I am getting when I did that.

I have not installed any web server. Please tell me what to do in order to make Differential work.

OK,

That error is arising from the daemons not able to create the directory for the repository. The daemons as the user specified in phd.user, or as the user running them (phd start) if you didn't specify anything. The user the daemons run as needs to own the /var/repo/ directory (Which is where Phabricator keeps repositories). You can change that by configuring repository.default-local-path (You'll need to restart the daemons).

AdityaGoel claimed this task.

Thanks! That did it.