SonarCloud Error

We have a project in Android build using Java Language. We followed all the steps but when running the job form git hub getting the below error even though we added token on the .github/workflows/build.yml . Kindly advise .

Run ./gradlew build sonarqube --info
/home/runner/work/_temp/a092195a-3013-4cbb-a2f3-5eb68276ac91.sh: line 1: ./gradlew: Permission denied
Error: Process completed with exit code 126.

What Could be reason Can you advise ?

Hi @salmanch92,

It seems that the problem lies not in the permissions with the Sonarcloud itself but the permissions to the “.gradlew” file. Can you double-check if you have the right permissions to execute “gradlew”?

Best,
Marcin

In my case it was sufficient to add the following step:

- name: Change wrapper permissions run: chmod +x gradlew

before the first one running the gradle wrapper, which means, if you are using the default sonarcloud settings, before the following line:
- name: Build and analyze

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.