Gitlab Migration

From Public PIC Wiki
Revision as of 12:07, 10 January 2019 by Tallada (talk | contribs) (→‎Issues and Troubleshooting)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

In order to upgrade the gitlab service, it was required to move it to a new host. The migration of the git repositories from the old host to the new one cannot be done transparently because the previous version has not easy upgrade procedure. For newer releases, all information will be preserved and the procedure will be done without any user intervention.

Also, note that for this particular upgrade, all information from tickets, merge requests and wiki WILL NOT BE MIGRATED.

In order to migrate your git repositories to the new host, follow these instructions:

1) Log into https://gitlab.pic.es with your PIC credentials

2) If you use want to use SSH authentication, you have to upload the corresponding public key. You can access this from the Settings drop-down menu in the top-left of the screen.

3) For each git repository that you want to migrate, execute the the following commands onto the directory it resides:

   # Update the URL of the repository
   $ git remote set-url origin $(git remote show -n origin | grep "Fetch URL" | awk '{print $3}' | sed s/gitlab0[12].pic.es/gitlab.pic.es/g)
   
   # Remove old gitlab01.pic.es host key
   $ ssh-keygen -R gitlab.pic.es
   
   # Push everything to new remote
   $ git push origin --all
   $ git push origin --tags

The old gitlab service will still be available on read-only at gitlab01.pic.es until the end of February 2019, when it will be finally decomissioned.

For users of projects (i.e. CTA) that already migrated, you still need to update your remote URL (step 3) to be able to take advantage of future upgrades.

Issues and Troubleshooting

TCP connection reset by peer

You may be one of the few unlucky users that see this error appearing when trying to clone or fetch from gitlab.

git clone https://gitlab.pic.es/user/repository.git
fatal: unable to access 'https://gitlab.pic.es/user/repository.git': TCP connection reset by peer

As this note from Stack Overflow says, the version of the git package included on Red Hat version 5, lower than 6.8 and lower than 7.2 doesn't support TLSv1.2, the one needed for SSL transfers.

Please, update your Operating System or try to update your git version.

GitLab: The project you were looking for could not be found

Group members and permissions might have not been migrated. Please send a support request to astro@pic.es.