Configuring pull mirroring from GitHub.com to GitLab.com via API returns error
Summary
Our documentation states that you should be able to configure HTTPS pull mirroring via the API. However, this does not appear to work, at least between GitHub Cloud and GitLab.com.
Steps to reproduce
This case assumes all projects involved are private and that the project on GitLab.com has an ID of 23128347
- Create a project on GitLab.com within a namespace on Bronze or higher.
- Create a project on GitHub Cloud.
- Using a PAT scoped to
api
, issue the following API call.
curl --request POST --header "PRIVATE-TOKEN: TOKEN" "https://gitlab.com/api/v4/projects/23128347/mirror/pull?import_url=https://git:TOKEN@github.com/tristan-jw/private-mirror.git&mirror=true"
- Observe that the following error is returned.
{"message":"The project is not mirrored"}%
Example Project
GitLab.com Project GitHub.com Project
Access to these private projects can be granted if needed.
What is the current bug behavior?
When attempting to configure pull mirroring between a GitHub.com project and a GitLab.com one, an error is returned.
What is the expected correct behavior?
Pull mirroring should be configured successfully between GitHub.com and GitLab.com when the appropriate API call is issued.
Relevant logs and/or screenshots
Header from the above API call:
date: Thu, 17 Dec 2020 21:14:15 GMT
content-type: application/json
content-length: 41
cache-control: no-cache
vary: Origin
x-content-type-options: nosniff
x-frame-options: SAMEORIGIN
x-gitlab-feature-category: continuous_integration
x-request-id: 01ESS8VAPC6MPV2JJVKS4MDN6V
x-runtime: 0.060515
ratelimit-limit: 600
ratelimit-observed: 2
ratelimit-remaining: 598
ratelimit-reset: 1608239715
ratelimit-resettime: Thu, 17 Dec 2020 21:15:15 GMT
gitlab-lb: fe-08-lb-gprd
gitlab-sv: localhost
cf-cache-status: DYNAMIC
cf-request-id: 071426c28b0000e7b9f1146000000001
expect-ct: max-age=604800, report-uri="https://report-uri.cloudflare.com/cdn-cgi/beacon/expect-ct"
server: cloudflare
cf-ray: 6033a7174eaae7b9-LAX
Output of checks
This bug happens on GitLab.com: 13.7.0-pre f3ae02692ad
Zendesk Reports (GitLab Internal)
Customers
Edited by Daniel Gruesso