Started by user isTester 
Building remotely on isTester_Slave  in workspace /root/jenkins/workspace/ajt_test/Test_web
[Pre_cjds_web] $ /bin/sh -xe /tmp/jenkins1044899056570118761.sh
+ git --version
/tmp/jenkins1044899056570118761.sh: line 2: git: command not found
Build step 'Execute shell' marked build as failure
SSH: Current build result is [FAILURE], not going to run.
Finished: FAILURE

如上,

服务器 ,已经安装了Git ,也配置了环境变量 。


为何Jenkins读不到 ?


解决思路:

1. 在服务器,输出 echo $PATH

2. 得到path路径后,在Jenkins「系统设置」中,配置全局属性,加上


搞定 。

Logo

瓜分20万奖金 获得内推名额 丰厚实物奖励 易参与易上手

更多推荐