There are 2 kinds of mirroring in GitLab: pull (mirroring from another repo) and push (mirroring to another repo). Today I tried the second one!
For mirroring you need an already created repository on GitLab of course. Then it’s needed to create another one on GitHub.
When you have opened GitHub, you should also create PAT (Personal Access Token) by going into: Settings -> Developer settings -> Personal access token -> Generate new token. Type into Note some text (e.g. gitlab_repository_name) and select public_repo (under repo), then click Generate token and copy or leave open tab with shown token for later copy+paste (if you close tab, you won’t see the token again).
Go to the repository on GitLab and click Settings -> Repository. Expand Mirroring repository section. In the Git repository URL type/paste:
https://<your_github_username>@github.com/<your_github_group_probably_your_username>/<your_github_project>.git
In my case: https://koralowiec@github.com/koralowiec/currconv.git.
Remember about username with @ before github.com and .git and the end of the URL!
Then choose Push in Mirror direction and paste github’s token. Click Mirror repository and that’s almost everything!
Now you should see little table with Mirrored repositories at the end of Mirroring repository section, click Update now button (two arrows)!