diff --git a/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php b/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php index 7b67006c4e..1fabb8c06f 100644 --- a/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php +++ b/src/applications/repository/daemon/gitfetch/PhabricatorRepositoryGitFetchDaemon.php @@ -37,8 +37,10 @@ final class PhabricatorRepositoryGitFetchDaemon PhabricatorRepository $repository, $local_path) { - $repository->execxLocalCommand( - 'fetch --all'); + // This is a local command, but needs credentials. + $future = $repository->getRemoteCommandFuture('fetch --all'); + $future->setCWD($local_path); + $future->resolvex(); } } diff --git a/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php b/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php index 9bee564e41..1204cd78b8 100644 --- a/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php +++ b/src/applications/repository/daemon/mercurialpull/PhabricatorRepositoryMercurialPullDaemon.php @@ -35,8 +35,11 @@ final class PhabricatorRepositoryMercurialPullDaemon protected function executeUpdate( PhabricatorRepository $repository, $local_path) { - $repository->execxLocalCommand( - 'pull -u'); + + // This is a local command, but needs credentials. + $future = $repository->getRemoteCommandFuture('pull -u'); + $future->setCWD($local_path); + $future->resolvex(); } }