Transferring ownership of a GitLab repo

Software
Author

Esther Plomp, Lora Armstrong

Published

September 2, 2022

This guide on transferring ownership of a GitLab repo has been set up by Lora Armstrong.

What happens to my GitLab projects when I leave TU Delft?

Currently there are no plans to delete your repositories (see https://gitlab.tudelft.nl/help).

Can my supervisor/collaborators still access my GitLab projects when I leave?

If they have access to your projects, they will still have access after you leave. You can control who has access to your projects by going to Project Information > Members in the sidebar of your repository. To be safe, transfer ownership of the projects to a current TU Delft employee when you leave!

How do I transfer ownership of my project to my supervisor or someone else at TU Delft?

You can transfer a project to another user’s GitLab namespace.

Summary (based on this Stack Overflow post): ​​Move your project from your namespace to a group where both you and the other user are owners, then the other user can transfer it to their own namespace.

Instructions:

  1. Create a new group if you don’t already have one that you want to use (Menu > Groups > Create group)

  1. Make sure that both the maintainer of the project repository, and the person who it will be transferred to, are members of the group and have the Owner role (to add a new owner: go to the group namespace, then from the sidebar choose Group information > Members > Invite members. Enter username or email of the person you want to invite and change the role to ‘Owner’. Click ‘Invite’.)

  1. Have a maintainer of the project repository transfer it to the group namespace (go to the project namespace, then from the sidebar go to Settings > General > Advanced > Transfer Project).

  1. After doing this, the maintainer(s) of the project will get an email notifying that the project has been moved to a different location.
  2. Now the person who the project is being transferred to can move it to their own namespace (go to the project namespace, then from the sidebar, go to Settings > General > Advanced > Transfer Project like before).
  3. If desired, the group can be deleted after the transfer is complete (go to the group namespace, then from the sidebar go to Settings > General > Advanced > Remove Group).

Note

Providing a more straightforward way to transfer ownership in GitLab was raised as an issue in 2016, which is unfortunately still open.