Sonar Analysis from Github Action Workflow Failing with Error

Help required please. Has anyone encountered same issue ?. It fails and when I replace token it passes again but fails after some weeks even though I have Analysis Execution Role switched on for my user.

Hey there.

What sounds most possible is that the token is being revoked after some period of time (note that tokens on SonarCloud do not automatically expire). Are you sure the token still exists in SonarCloud?

Thanks for your swift response @Colin , I have also confirmed that the token still exists in sonar cloud.

@Colin Is it possible to set a custom expiration period for tokens on SonarCloud ? like setting expiration to a longer date ahead.

Hey @lewisoj

SonarCloud tokens do not expire until manually revoked.

1 Like

Good day @Colin I am getting the following error during Github actions Sonar cloud analysis. This Error seems different from the previous error I reported.

INFO: Auto-configuring pull request 758
INFO: ------------------------------------------------------------------------
INFO: ------------------------------------------------------------------------
INFO: Total time: 42.473s
ERROR: Error during SonarScanner execution
ERROR: Could not find a default branch to fall back on.

Please do you have an idea on what could be causing this ? I will appreciate any hints. Thanks

As you’ve raised a new thread, I’ll close this one.