I'm trying to integrate Travis CI with my GitHub project. I managed to configure Travis plugin successfully with my repository by following Travis getting Started Guide
But when i pushed my first commit after integrating Travis ,it is giving me this error when it auto builds.
/home/travis/build.sh: line 179: ./gradlew: Permission denied
The command "eval ./gradlew assemble" failed. Retrying, 2 of 3.
Below is a screenshot of the Travis build :
And these are the lines that i have in my .travis.yml
file :
language: java
before_script:
- chmod +x gradlew
In your .travis.yml
add these lines:
before_script:
- chmod +x gradlew
Travis instances are linux and require write permissions for executables that output artifacts.
I tried that "before_script"-version, but it didn't work for me.
After changing before_script
to before_install
it worked as expected (and no sudo was required)
before_install:
- chmod +x gradlew
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With