User:Sebastian Berlin (WMSE)/Tmp/Gitlab, mirro to Github
Appearance
Preparations
[edit]- Create a repo on Github, if you haven't already. This can be done by importing the Gitlab repo.
- Create a personal access token in Github. This is done on https://github.com/settings/tokens?type=beta. Add permission "Contents" -> "Access: Read and write".
Set up mirroring
[edit]- In the repo view in Gitlab go to "Settings" (bottom in the left hand menu) -> "Repository".
- Expand "Mirroring repositories".
- Enter the HTTPS URL of the Github repo, same as the clone URL, but include username, i.e. https://username@github.com/....git.
- Leave "Mirror direction", it seems you can't change it anyway.
- Select "Password" for "Authentication method".
- In "Password" enter the personal access token from your Github account.
- Click "Mirror repository". You should get a message at the top of the page saying it worked.
Test mirroring
[edit]- Make a commit in the Gitlab repo.
- Click the circular arrows ("Update now") to start an update. If it goes through changes should be pushed to the Github repo.