How to move data from gitlab to gitlab2

From ifiWiki
Jump to: navigation, search

How to move data from gitlab to gitlab2

All information without guarantee and liability.

Projects

When creating a new project on gitlab2, enter the https-url of your project in field "Import project from -> Any repo by URL". Do not forget to add your authentication information to the URL, e.g. https://<USER>:<PASSWORD>@gitlab.informatik.uni-wuerzuburg.de/...

If your password or username contains characters which are not allowed in an URL, gitlab2 might show you an error message. In this case, just percent encode your password/username. One easy way to do this is to open your browser, fire up the developer tools and use the javascript console to encode it. Just enter
encodeURIComponent("blar?blubb>your password_here")
and you will get something along the lines of
blar%3Fblubb%3Eyour%20password_here
which you can then use as your password/username.

Wiki

Clone your wiki locally to your computer

 git clone https://gitlab.informatik.uni-wuerzburg.de/YOUR_USERNAME/YOUR_REPOSITORY.wiki.git

Push it to gitlab2

 cd <wiki pages>
 git push https://gitlab2.informatik.uni-wuerzburg.de/YOUR_USERNAME/YOUR_NEW_REPOSITORY.wiki.git master

Issues

Try to use this tool: https://github.com/gotsunami/gitlab-copy