Setting up "Pull or Push mirroring configuration" using GitLab API

Hello,

Can anyone from GitLab engineering or support provide us with any latest updates on this feature or issue? We are trying to test “pull mirroring configuration using the API” between our 2 GitLab Self-Managed instances. We eventually want to setup “pull mirroring configuration using the API” between our GitLab self-managed and GitLab SAAS. There is not enough information available in the GitLab documentation. I tried to implement solutions found on some forums for the same issue. But they didn’t work out for us. Also, I have mentioned about this already in an ongoing support ticket. We haven’t received a response yet. We have over 300 projects that we are planning to migrate to GitLab SAAS and we want setup “Pull or Push” mirroring on these projects post migration and before the final switchover to GitLab SAAS. Below are some of the solutions we tried to implement with different combinations (using <REMOTE_USER_ID>:<REMOTE_USER_PASSWORD>/<REMOTE_USER_ID>:<REMOTE_ACCESS_TOKEN>). Please advise on the next steps. thank you for your time.
option A: output: “error”:"404 Not Found
`

curl --request POST
–url “https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>”
–header “content-type: application/json”
–header “PRIVATE-TOKEN: <ACCESS_TOKEN>”
–data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:<REMOTE_USER_PASSWORD>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’

curl --request POST
–url “https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>”
–header “content-type: application/json”
–header “PRIVATE-TOKEN: <ACCESS_TOKEN>”
–data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:<REMOTE_ACCESS_TOKEN>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’
`

option B: output: “message”:“401 Unauthorized”
`

curl --request PUT
–url “https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>”
–header ‘Content-Type: application/json’
–header ‘Authorization: <ACCESS_TOKEN>’
–data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:
<REMOTE_USER_PASSWORD>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’

curl --request PUT
–url “https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>”
–header ‘Content-Type: application/json’
–header ‘Authorization: <ACCESS_TOKEN>’
–data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:<REMOTE_ACCESS_TOKEN>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’
`

option C: output: “message”:“401 Unauthorized”
`

curl -H’Content-Type: application/json’ -H’Authorization: <ACCESS_TOKEN>’ -XPUT --data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:<REMOTE_USER_PASSWORD>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’ https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>

curl -H’Content-Type: application/json’ -H’Authorization: <ACCESS_TOKEN>’ -XPUT --data ‘{“mirror”: true, “import_url”:“https://<REMOTE_USER_ID>:<REMOTE_ACCESS_TOKEN>@<REMOTE_GITLAB_INSTANCE>//<PROJECT.git>”}’ https://<GITLAB_URL>/api/v4/projects/<PROJECT_ID>
`