I have a Jenkinsfile with the following stage executing a bash (sh) script:
stage('Prepare') {
sh 'cd ./bin && ./prepare.sh'
}
The Jenkins fails the stage producing an error:
14:27:16 + cd ./bin 14:27:16 + ./prepare.sh 14:27:16 /data/jenkins/workspace/repo_J_tmp/durable-8864902e/script.sh: line 1: ./prepare.sh: Permission denied
I use IntelliJ Idea and Windows. How to change and push the rights?
The command chmod=+x ./bin/prepare.sh in Git Bash is not registered as a change, so there is nothing to commit.