Piotr Wach
Piotr Wach

Reputation: 1005

Phabricator git command not found

I have followed Phabricator installation & configuration guides: http://www.phabricator.com/docs/phabricator/article/Installation_Guide.html http://www.phabricator.com/docs/phabricator/article/Configuration_Guide.html

When I navigate to http://localhost to do final setup I get this message that says it can not find git command (there is also warning that "warn pcntl is not available!":

PHABRICATOR SETUP

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                This setup mode will guide you through setting up your Phabricator configuration.


>>>  CORE CONFIGURATION  -------------------------------------------------------

 okay  PHP's deprecated 'safe_mode' is disabled.
 okay  'open_basedir' is not set.
[WARN] You have not configured 'security.alternate-file-domain'. This makes your installation vulnerable to attack. Make sure you read the documentation for this parameter and understand the consequences of leaving it unconfigured.
 okay  $PATH is nonempty.
[OKAY] Core configuration OKAY.


>>>  REQUIRED PHP EXTENSIONS  --------------------------------------------------

 okay  Extension 'mysql' installed.
 okay  Extension 'hash' installed.
 okay  Extension 'json' installed.
 okay  Extension 'openssl' installed.
 okay  Extension 'mbstring' installed.
 okay  Extension 'iconv' installed.
 okay  Extension 'curl' installed.
 okay  PHP binary found on the command line.
 okay  PHP is available from the command line.
 okay  'php' is CLI SAPI.
 warn  pcntl is not available!
[WARN] *** WARNING *** pcntl extension not available. You will not be able to run daemons.


>>>  GIT SUBMODULES  -----------------------------------------------------------

EXCEPTION!
exception 'CommandException' with message 'Command '(cd '/Users/piotr/Phabricator/phabricator' && git submodule status)' failed with error #127:
stdout:

stderr:
sh: git: command not found

' in /Users/piotr/Phabricator/libphutil/src/future/exec/ExecFuture.php:334
Stack trace:
#0 /Users/piotr/Phabricator/libphutil/src/future/exec/execx.php(34): ExecFuture->resolvex()
#1 /Users/piotr/Phabricator/phabricator/src/infrastructure/PhabricatorSetup.php(264): execx('(cd %s && git s...', '/Users/piotr/Ph...')
#2 /Users/piotr/Phabricator/phabricator/webroot/index.php(121): PhabricatorSetup::runSetup()
#3 {main}

I also want to mention that I have git and I can run it without problems from terminal.

Upvotes: 1

Views: 1274

Answers (2)

Piotr Wach
Piotr Wach

Reputation: 1005

I have solved it.

The problem was in missing pcntl extension in PH. I had to compile it from source (as described here: http://blog.lancerushing.com/2011/02/getting-phps-pcntl-working-on-snow.html).

Upvotes: 0

Omid Kamangar
Omid Kamangar

Reputation: 5788

Find the user which your web server is running on, and find out if git is included in the path environment variable of that user.

Upvotes: 1

Related Questions