cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

repairnpm error in Jenkins during ant clean all

0 Kudos
1,262

We are upgrading Hybris 2005 -> 2205.

While performing ant clean all in Jenkins, we are getting below error

Cannot run program "/...../repairnpm.sh" (in directory "/jenkinsdata/..../workspace/hybris/bin/platform"): error=13, Permission denied

Java version is 17

View Entire Topic
alemasetto
Participant
0 Kudos

To fix this issue, you can either give the Jenkins user execute permissions on the repairnpm.sh script or run the Jenkins build as a user that already has execute permissions on the script.
You can also try this command : chmod +x /...../repairnpm.sh, it will give execute permission to the repairnpm.sh file.

EDIT:  I  faced this issue again and I fixed it  by reinstalling the JDK.
In my case, I downloaded the JDK on my WSL2 partition AND I used 7zip (from Windows)  to unzip the  .tar.gz (in a WSL folder). It turned out that the JDK files were corrupted and unable to properly execute the scripts (even if  "java -version" was printing the correct message!) . So, here are the correct steps:

  1.  delete the the JDK folder
  2. wget https://github.com/SAP/SapMachine/releases/download/sapmachine-21.0.9/sapmachine-jdk-21.0.9_linux-x6...
  3. tar -xzf sapmachine-jdk-21.0.9_linux-x64_bin.tar.gz   (don't use Windows tools)
  4. ant all
0 Kudos

Hi Alessandro thank you for responding.

I tried this chmod in jenkins file with the exact directory path to the file.

But still the error appears.