Steps to reproduce:
- PHP 8.2.7; Phorge at bab99707405585911ca0e07d52d7117acd08fbcc
- Check that http://phorge.localhost/config/edit/repository.default-local-path/ is set to default /var/repo/
- Make sure that /var/repo/ exists locally with permissions that only the root user can access that directory and not Phorge
- As a Phorge admin, go to Diffusion at http://phorge.localhost/diffusion/
- Select in upper right corner to go to http://phorge.localhost/diffusion/edit/form/default/
- Select "Create Git Repository" to go to http://phorge.localhost/diffusion/edit/form/default/?vcs=git
- On the Create Repository page, in the Name field, enter gitRepo
- Select the Create Repository button
- Go to http://phorge.localhost/diffusion/17/manage/
- Select in the left panel (while no directory exists for this code repository)
- Look at the Working Copy Status section on http://phorge.localhost/diffusion/17/manage/
Actual outcome:
Initialization Error Pull of 'R17' failed: strlen(): Passing null to parameter #1 ($string) of type string is deprecated Raw Error Error updating working copy: strlen(): Passing null to parameter #1 ($string) of type string is deprecated
Expected outcome:
Initialization Error Pull of 'R17' failed: Command failed with error #128! COMMAND git init --bare -- /var/repo/17 STDOUT (empty) STDERR fatal: cannot mkdir /var/repo/17: Permission denied Raw Error Error updating working copy: Command failed with error #128! COMMAND git init --bare -- /var/repo/17 STDOUT (empty) STDERR fatal: cannot mkdir /var/repo/17: Permission denied
Other comments:
No stacktrace as nothing is in the error log, thus I temporarily edited src/applications/repository/management/PhabricatorRepositoryManagementUpdateWorkflow.php to print $ex->getExceptionTrace()) in the UI to find the line to fix.