[SOLVED] ERROR 500: sudo: a password is required for Phabricator hosted repository

I am becoming beyond desperate. I have never seen an issue like this. I have spent hours troubleshooting this all over the internet and it still will not stop.

Attempting to clone a repository results in an HTTP 500 Internal Server Error, with the explanation: “sudo: a password is required”.

My Phabricator instance runs as user ‘phabricator-d’.

My /etc/sudoers:

Adding SETENV: before NOPASSWD changes nothing, just for anyone wondering

This is the only Phabricator-related error that shows in my NGINX error.log:

2018/04/14 18:45:45 [error] 777#777: *471 FastCGI sent in stderr: “PHP message: [2018-04-14 14:45:45] EXCEPTION: (PhabricatorFileIntegrityException) File data integrity check failed. Dark forces have corrupted or tampered with this file. The file data can not be read. at [/src/applications/files/engine/PhabricatorFileStorageEngine.php:342]
PHP message: arcanist(head=master, ref.master=73f5afd44110), phabricator(head=master, ref.master=c46be2a70b4d), phutil(head=master, ref.master=20eff1c8d14f)
PHP message: #0 <#2> PhabricatorFileStorageEngine::getRawFileDataIterator(PhabricatorFile, NULL, NULL, PhabricatorFileRawStorageFormat) called at [/src/applications/files/storage/PhabricatorFile.php:805]
PHP message: #1 <#2> PhabricatorFile::getFileDataIterator(NULL, NULL) called at [/src/applications/files/controller/PhabricatorFileDataController.php:110]
PHP message: #2 <#2> PhabricatorFileDataController::handleRequest(AphrontRequest) called at [/src/aphront/configuration/AphrontApplicationConfiguration.php:258]
PHP message: #3 phlog(PhabricatorFileIntegrityException) called at [/src/aphront/handler/PhabricatorDefaultRequestExceptionHandler.php:41]
PHP message: #4 PhabricatorDefaultRequestExceptionHandler::handleRequestThrowable(AphrontRequest, PhabricatorFileIntegrityException) called at [/src/aphront/configuration/AphrontApplicationConfiguration.php:670]
PHP message: #5 AphrontApplicationConfiguration::handleThrowable(PhabricatorFileIntegrityException) called at [/src/aphront/configuration/AphrontApplicationConfiguration.php:263]
PHP message: #6 AphrontApplicationConfiguration::processRequest(AphrontRequest, PhutilDeferredLog, AphrontPHPHTTPSink, MultimeterControl) called at [/src/aphront/configuration/AphrontApplicationConfiguration.php:181]
PHP message: #7 AphrontApplicationConfiguration::runHTTPRequest(AphrontPHPHTTPSink) called at [/webroot/index.php:17]” while reading response header

Obviously, TTY is not the issue here. I have read through the configuration guide a thousand times over. I do not understand why I am having this issue.

Any help is greatly appreciated!

Of all things, 3 hours worth of troubleshooting later: I neglected to change the user for the webserver. On my system, it is WWW-DATA, not WWW-USER.

Learn from my ignorance.