We previously had issues with setting our organizations GitLab PAT, when user was not “Owner” (what GitLab calls the Admin Role).
We tried to rotate our Token currently working token using our previously described workaround. But this time we found not way to successfully update the Token.
The steps we tried:
Gave the GitLab user Owner permissions
Created PAT with scope API on that user
Entering the token in SonarCloud GitLab connectivity management
However with every try, we where told that the token was not valid.
Any idea why this is happening now?
Thanks
Next we changed to User to have Admin rights (GitLab calls that “Owner”).
For this we:
Switched the rights of the “technical user” to “Owner”(=Admin)
Tried to apply the same token as before in Sonar Cloud
Result:
“You need to have admin access on the group” This is not expected and the new token should be accepted
Updating the token with “Owner” permissions
Not sure if this might be a caching issue, we generated a new token, with the “technical user” having “Owner” (=Admin) rights throughout.
For this we:
Revoked token which was used for previous attempt
Created a new token with API permission on our existing “technical user” (Access Level “Owner”)
Tried to update the token in Sonar Cloud
Result:
“You need to have admin access on the group” This is not expected and the new token should be accepted
Conclusion
At the Moment Sonar is working for us with GitLab.
We cannot update our GitLab token.
If our token would have an expiry date, SonarCloud integration would break for us.
We tried this on 22-09-2022 between 12:00 and 12:10 UTC if that helps with debugging.