DEV Community

[Comment from a deleted post]
Collapse
 
kavindyasinthasilva profile image
kavindu yasintha silva

To perform a one-off authorization with GitHub to grant GitLab access your repositories:

Open github.com/settings/tokens/new to create a Personal Access Token. This token will be used to access your repository and push commit statuses to GitHub.

The repo and admin:repo_hook should be enable to allow GitLab access to your project, update commit statuses, and create a web hook to notify GitLab of new commits.

In GitLab create a CI/CD for external repo project and select G

Paste the token into the Personal access token field and click List Repositories. Click Connect to select the repository.

In GitHub, add a .gitlab-ci.yml to configure GitLab CI/CD.

GitLab will:

Import the project.
Enable Pull Mirroring
Enable GitHub project integration
Create a web hook on GitHub to notify GitLab of new commits