I'm trying to mirror a bitbucket repo to gitlab and need to add a custom header, PRIVATE-TOKEN, containing my gitlab access token, in order to invoke gitlab's mirror pull API: https://gitlab.com/help/api/projects.md#start-the-pull-mirroring-process-for-a-project-starter.
There's no option for it in the webhook creation dialog. How can I do that?
Hi @Matthew Adams ,
Welcome to the Atlassian Community!
Even if there is no possibility at the moment to add custom headers to Bitbucket Webhooks, the way to send authenticated WebHooks to Gitlab seems to be described in the below documentation page (from Gitlab):
In GitLab create a CI/CD for external repo, select Repo by URL and create the project.
GitLab will import the repository and enable Pull Mirroring.
In GitLab create a Personal Access Token with
apiscope. This will be used to authenticate requests from the web hook that will be created in Bitbucket to notify GitLab of new commits.
In Bitbucket, from Settings > Webhooks, create a new web hook to notify GitLab of new commits.
The web hook URL should be set to the GitLab API to trigger pull mirroring, using the Personal Access Token we just generated for authentication.
The web hook Trigger should be set to ‘Repository Push’.
Together with the above one, you may want to also review below liks:
For the rest, it might be worth also mentioning that:
I hope this helps.
Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events