如何在GitLab中更改项目所有者?
项目设置中有一些选项,但在"transfer“字段中,它无法识别任何用户名或任何内容。是否可以更改所有者权限和root权限?
发布于 2021-04-08 23:08:13
如果您需要为许多项目执行此操作,则通过API可以非常方便地执行此操作:
import gitlab
gl = gitlab.Gitlab('https://gitlab.com', private_token='...')
gitlab_project = gl.projects.get("the-project-of-yours")
target_group = gl.groups.get("target-group-where-to-land")
gitlab_project.transfer_project(target_group.id)
https://docs.gitlab.com/ee/api/projects.html#transfer-a-project-to-a-new-namespace
https://docs.gitlab.com/ee/api/groups.html#transfer-project-to-group
https://github.com/python-gitlab/python-gitlab/blob/master/gitlab/v4/objects/projects.py#L461
发布于 2018-10-03 19:08:06
您基本上可以创建一个组,然后将项目添加到组中,然后从组成员设置中添加一个新的所有者,然后您可以自己离开组。
查看屏幕截图
发布于 2018-06-25 22:50:53
在GitLab Community Edition 9.3.5中,如果你是管理员,你应该去设置-> Members并改变你想要的成员的角色。
例如,搜索John Doe,设置开发人员角色,现在John Doe将成为开发人员,而不再是所有者。
https://stackoverflow.com/questions/21579693
复制相似问题