Gitlab Migration
The gitlab service need to be upgraded to a new version and host. It will be migrated from gitlab01.pic.es (running v6.x) to gitlab02.pic.es (running v11.x). This upgrade cannot be done transparently to the users because the actual version is too old. For newer releases this will be done without any user intervention.
In order to migrate your git repositories to the new host, follow these instructions:
1) If you use want to use SSH authentication, log into https://gitlab02.pic.es with your PIC credentials and upload your SSH keys.
2) Execute the following commands on each directory that holds a repository that need migration:
# Create a remote called new_gitlab with the new address of the repository $ git remote add new_gitlab $(git remote -v | awk '{print $2}' | sort -u | sed s/gitlab01.pic.es/gitlab02.pic.es/g) # Upload the repository to the new remote $ git push new_gitlab --all $ git push new_gitlab --tags # Rename the old remote $ git remote rename origin old_gitlab # Rename the new remote $ git remote rename new_gitlab origin
There will be a 3 month period where both gitlab host will coexist to give time users to migrate. After that, gitlab01 will be decomissioned and the gitlab.pic.es alias will point to gitlab02.pic.es. Users shall then update their remotes to point to the alias so that future upgrades can be done transparently.
# Change the remote called origin with the new address of the repository $ git remote set-url origin $(git remote -v | awk '{print $2}' | sort -u | sed s/gitlab02.pic.es/gitlab.pic.es/g)