Moving names[aces and projects when deleting users

Hello

I wish to delete a number of local users from a gitlab install (8.11.6 CE). If I just do this what happens to the projects they own?

I think I need to re-assign the projects and so on to another user. But I cannot find a way to do this as admin task.

I see that users can only move projects to namespace for which they have permission. But this is insufficient anyway.

I need as an admin to move the projects to another user or group and with the namespace to assign that elsewhere also. How do I accomplish that?

thanks

r.

Go in admin mode.
Lookup a user.
Block the user.
Go to each project of the user (from the user page).
Use “Transfer Project” (under Edit project) to move the project to another name space.

1 Like

I personally think it’s better to block or disable than to delete the user. Deleting the user deletes all the history including things that might not be transferred when you transfer the project.

is there a way to do this with a script?

One way to do this for the end-user manually is to move projects into groups, then back out of the group to the new owner.

i found the groups API, which can move projects INTO a group, but there is no API to move a project back to an individual user.

I also found ways to use the git protocol, but i have not enough experience to know what will be mirrored or if anything will be lost.

Our task:
We are joining authentication backends and need to migrate users off of the old one, deleting duplicate users. Thus we need to delete lots of users and migrate their projects to a new/other userID. We will need to do this for hundreds of users, thousands of projects. Any idea how to script this?
Cheers!
chris :slight_smile: