How do I create a root repository for a subgroup?
Asked Answered
W

1

2

When I create a group on gitlab, I can create a repo groupname.gitlab.io that is a root folder of the site. And I can create repos such as: css, img and so on, that are subfolders of the site. How do I do the same for a subgroup?

I have created a subgroup and a repo in it subgroupname.gitlab.io — this way doesn't work. Then I have changed this repo's path to .. — two dots. And now I have problems accessing this repo and managing it at all, and I can't rename or delete it. Also, I have the same problems with the subgroup and with the parent group. Also, the main page of the site has been cached somewhere and I can't update it. Clearing the runner's cache doesn't help.

The first question is: How do I create a root repository for a subgroup?

And now: How do I remove a subgroup that has a repo with the path .. — two dots? Or is there a way to forcibly delete this group?


I have tried the web interface and the gitlab api — the result is the same. My attempts:

  • Web interface:

    https://gitlab.com/group1989/subgroup/../edit
    https://gitlab.com/group1989/subgroup/%2e%2e/edit
    

    These URLs redirect to this one, which returns a 404 status code:

    https://gitlab.com/group1989/edit
    
  • GitLab api:

    curl --request PUT --header "PRIVATE-TOKEN: <my-token>" --url "https://gitlab.com/api/v4/groups/14681317" --data "path=qwer2"
    curl --request PUT --header "PRIVATE-TOKEN: <my-token>" --url "https://gitlab.com/api/v4/projects/32327385" --data "path=qwer2"
    

    These commands return the same result for the project and for the group:

    {"message":"500 Internal Server Error"}
    

SoapUI screenshot GET /projects/32327385:

GET /projects/32327385

Washington answered 22/12, 2021 at 19:1 Comment(4)
Related gitlab issue: Remove a subgroup that has a repo with the path .. — two dotsWashington
I guess for a self-managed version of gitlab, the solution is to transfer such groups to a ghost user and then hard delete it. But what should I do on gitlab.com?Washington
It sounds similar to this issue. In which case, your best bet may be to contact GitLab support for gitlab.com if you're unable to transfer/delete the project on your own. Maybe transferring to a new user or group namespace you have and deleting the group or user would work -- if you're able to transfer it in the first place.Laine
Is there a way to create a ghost user on gitlab.com where such groups can be moved so that they are automatically deleted? I am able to transfer those groups to another user. But one of these groups is a site with a specific name — I don't want to lose that name. How often can a ghost robot be launched so that I can recreate this group? Is it possible to solve this problem in this way?Washington
S
0

The related gitlab issue has been closed, seems like after this bug-fix — so I have deleted those consequences of the previous experiments...

Root repository for a subgroup — subfolder in the root repository

The website contains private and public pages:

https://site4.gitlab.io/
https://site4.gitlab.io/ru/
...
https://site4.gitlab.io/ru/2021/12/29/article-from-private-repo.html
...
https://site4.gitlab.io/ru/2022/01/05/article-from-public-repo.html
...
https://site4.gitlab.io/index.html
https://site4.gitlab.io/ru/index.html

The structure of Gitlab projects consists of private and public repos:

site4 — group-public
├─ ...
├─ ru — subgroup-public
│  ├─ 2021 — repo-private
│  │  └─ 12 — folder
│  │     └─ 29 — folder
│  │        └─ article-from-private-repo.html — file
│  └─ 2022 — repo-public
│     └─ 01 — folder
│        └─ 05 — folder
│           └─ article-from-public-repo.html — file
├─ ...
└─ site4.gitlab.io — repo-private
   ├─ ru — folder
   │  └─ index.html — file
   └─ index.html — file
Surface answered 5/1, 2022 at 21:9 Comment(1)
merry christmas and happy new yearSurface

© 2022 - 2024 — McMap. All rights reserved.