When i run repo init
from ubuntu terminal it is working fine.
Then i created a freestyle Jenkins job which runs on the same ubuntu machine. In execute shell block i added #!/bin/bash
and repo init
While executing Jenkins Job i am facing following error
tmp/jenkins10026024406501021323.sh
/tmp/jenkins10026024406501021323.sh: line 2: repo: command not found
.bashrc
file was missing, after creating .bashrc
file and adding export PATH=$HOME/.local/bin:$PATH
in .bashrc
resolves this error.