'Will Gitlab aliases allow me to move project without breaking the exising paths

I am planning to do some cleanup in my gitlab moving projects around (company grew a bit and we need to add a few more layers to the repository structure)

Now if I move a repo, then all existing code would break (old docker image paths, old git push/pull urls etc.)

I googled for project aliasing and found that there is an API that lets me create project aliases, but other than the endpoints this feature is completely undocumented and I cannot find it in the UI.

Does the feature work the way I think that if I would move a project foo/bar to acme/foo/bar then I could use both names for docker images, git clone/push/pull etc.?



Solution 1:[1]

Yes, and aliases are created for the web URL, git push/pull, etc by default when you move a project. See also What happens when a repository path changes for more information.

However you cannot move/transfer a project that has a a container registry with images. See the docs:

Moving or renaming existing Container Registry repositories is not supported once you have pushed images, because the images are stored in a path that matches the repository path. To move or rename a repository with a Container Registry, you must delete all existing images. Community suggestions to work around this limitation have been shared in issue 18383.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 sytech