During page load API request is done: "https://sonarcloud.io/api/alm_integration/list_repositories?organization=someorg
it return records with record for test-project
{
“label”: “test-project”,
“installationKey”: “somekey”,
“linkedProjects”: [
{
“key”: “someorg_test-project”,
“name”: “test-project”
}
],
“private”: true
},
In search box enter name of the project (let’s say “test-project”)
Project found with status “Already imported”
When I click on it - I can see page with " The requested project does not exist, or you have not been granted access."
Problem: So I cannot import project, cannot delete it to import again
Someone has created the project in your organization, but for whatever reason (usually a misconfigured permission template), you don’t have access to that project. This thread can help you out
Somebody previously imported your Gitlab group into SonarCloud and stopped using SonarCloud, but the project binding is still active. This is usually quite complicated to fix unless you can track down the admin of whoever tried using SonarCloud in your org before.
Is someorg your organization key, or something else?
Thank you Colin. Yes, ‘someorg’ - is customer organization (). But I also have owner rights (real name replaced with this value)
If this could help - I can see by following this link https://sonarcloud.io/organizations/someorg/edit
In block “Key”:
someorg
Other projects have keys someorg_test-project2, someorg_test-project3 there more than 60 projects and problem is only with this one.
Is it possible to delete this blocking us record on Sonar side?
(there is no possibility to rename gitlab project to avoid issue)
And than we will be able to import it.
Colin thank you for extend and detail instructions
Have check the calls:
curl --header 'Authorization: Bearer <sometoken>' -X POST 'https://sonarcloud.io/api/permissions/add_user?projectKey=someorg_test-project&login=<someuser>@gitlab&permission=admin&organization=someorg'
Get 400 response with body: {"errors":[{"msg":"Organization key is incorrect."}]}
But when I try do same for another project someorg_working-project that has no issue:
curl --header 'Authorization: Bearer <sometoken>' -X POST 'https://sonarcloud.io/api/permissions/add_user?projectKey=someorg_working-project&login=<someuser>@gitlab&permission=admin&organization=someorg'
I get 204 response code
This block to move forward to DELETE API call, probably there are some other possible ways to overcome it?