我在JENKINS中遇到了一个调度作业的问题。下面的命令在终端(Mac)中运行良好,无论是否使用SUDO(必须输入密码)
如果没有Sudo,我将得到“不允许操作”错误
下面是我在JENKINS中得到的构建语句和错误,有人能帮我解决吗
export PYTHONPATH=${PYTHONPATH:-"/Users/it/Documents/google_crawler"}
cd /Users/it/Documents/google_crawler
sudo python3 PLA_Google_continious_execution.py
此外,还尝试了“sudo python3 PLA_Google_continious_execution.py”而不是“sudo python3 PLA_Google_continious_execution.py-S”password“,但结果相同
错误:
09:45:47 Started by timer
09:45:47 Running as SYSTEM
09:45:47 Building in workspace /Users/it/.jenkins/workspace/google_crawler
09:45:47 [google_crawler] $ /bin/sh -xe /var/folders/t2/sk1vw_mn7mz7ncjw75lzh7r40000gn/T/jenkins4461665640429805517.sh
09:45:48 + export PYTHONPATH=/Users/it/Documents/google_crawler
09:45:48 + PYTHONPATH=/Users/it/Documents/google_crawler
09:45:48 + cd /Users/it/Documents/google_crawler
09:45:48 + sudo python3 PLA_Google_continious_execution.py
09:45:48 sudo: a terminal is required to read the password; either use the -S option to read from standard input or configure an askpass helper
09:45:48 Build step 'Execute shell' marked build as failure
09:45:48 Finished: FAILURE
谁能帮我看看这个吗
使用此选项:
相关问题 更多 >
编程相关推荐