Interview Prep/CI/CD/Jenkins Build and Agent Failures

`Cannot run program "nohup" (in directory ...): error=2, No such file or directory` on a Windows agent.

IntermediateTroubleshootingJenkins Build and Agent Failures
Answer

Likely causes → The pipeline uses sh on a Windows node, which has no POSIX shell.

Diagnose → Check the node OS label and which step is used.

Fix → Use bat or powershell on Windows, or choose by isUnix(); install Git Bash only if truly necessary.

Prevent → Label nodes by OS and select agents with label 'linux' for shell steps.

All CI/CD questions Roadmap: CI/CD fundamentals

More on Jenkins Build and Agent Failures