詹金斯“设备或资源繁忙”

时间:2019-09-16 13:47:23

标签: git jenkins

登录虚拟机时运行以下命令:

git config -- global user.email [myEmailHere]@[mydomain].com

这很好用。

但是,当Jenkins作业通过groovy运行相同的命令时,出现以下错误:

error: could not write config file /home/jenkins/.gitconfig: Device or resource busy

是什么原因造成的?
我在网上查了一下,仍然找不到任何有用的东西。

1 个答案:

答案 0 :(得分:1)

在您的工作中,尝试并添加as in herelsof /home/jenkins/.gitconfig:作为detailed here,目标是检查是否存在可以保留句柄的PID(进程ID)在该文件上。

这将解释从Jenkins运行时的错误消息。
设置为multibranch pipeline的Jenkins通常会定期锁定该文件。