The OP created a Jenkins VM in the context of Bitnami Jenkins for Google Cloud Platform, you can check out the section "How to start with Git and Jenkins?"
As described below, that does not work well (the PATH does not include Git on bower operations)
Workaround, proposed by the OP:
Created another Jenkins VM, this time not using the Bitnami Jenkins.
It works out of the box.
Original answer.
Regarding bower
, check bower issue 972
had to go into /bower/lib/core/resolvers/GitResolver.js
and comment out the line that checks if Git is there to get this to work. It seems that the which
module isn't working correctly for me.
Commented out line:
if (!hasGit) {
throw createError('git is not installed or not in the PATH', 'ENOGIT');
}
More generally:
You need to make sure:
- Jenkins global settings has a Git PATH defined
- the slaves have a Git installed at that PATH
Example:

(Source: "Jenkins path to git Windows master / Linux slave")
That way, you don't depend on the PATH environment variable (on the master or the slaves), as Jenkins will complete it with the Git path defined.
Just in case the slave is executed with a different account (and different PATH
), try (if your current PATH
does include git
) to make that path available to all users (for testing):
echo "PATH=$PATH" | sudo tee /etc/environment