Recently , I had faced this issue in deploying my application in tomcat webserver .
This error is due to incorrect installation of GIT in your local drive . You can either clone your Repository in such a way that ,
post build actions -> execute shell -> git clone "your repo link"
Still if it doesn't workout , you can go for these steps :
Jenkins URL fix issue :
1️⃣ Go to Jenkins Dashboard → Your Job → Configure
2️⃣ Under "Build" Section → Click "Add Build Step" → Select "Execute Shell"
3️⃣ Enter the following commands:
cd /var/lib/jenkins/workspace/job/github-repolink
git pull origin master # Optional: Pull latest changes if git clone doesn't work
mvn clean package
ls -lh target/ # Verify if .war file is created
4️⃣ Save the job and run the build.
Check this out .