5

I have a Gitlab Pages project site hosted as my.gitlab.io/old.

I rename the project repo to new. When I push again, it still publishes to my.gitlab.io/old.

How do I change it to my.gitlab.io/new?

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
user341554
  • 569
  • 2
  • 8
  • 16

2 Answers2

6

To rename a repository:

  1. Navigate to your project’s Settings > General > Advanced settings.
  2. Under Change path section, change the Path to your liking.
  3. Hit Change path button for these changes to take effect.

enter image description here

Penny Liu
  • 15,447
  • 5
  • 79
  • 98
  • I did this but the old path still works for cloning, push, pull, etc. Shouldn't the old path stop working? – BigBrownBear00 Mar 10 '22 at 20:38
  • The redirects are available as long as the original path is not claimed by another group, user, or project. https://docs.gitlab.com/ee/user/project/repository/index.html#what-happens-when-a-repository-path-changes – kabot Feb 20 '23 at 16:53
0

In GitLab, a Project name and its path are different.

I assume the Project has the following configuration:

  • Project name: new
  • Path: gitlab.com/my/old

It should be:

  • Project name: new
  • Path: gitlab.com/my/new