我想更改每个存储库的 Gitlab 镜像设置。是否可以通过 Gitlab API 执行此操作?
如何通过 API 更改它们?
备注:这与 "How can I tell Gitlab to mirror my Github repositories over the API?" 不是同一个问题因为我的问题是如何开始镜像,这里我想知道如何更改镜像设置。
最佳答案
关于https://docs.gitlab.com/ee/api/projects.html#edit-project配置拉取镜像有几个参数:
> mirror
> mirror_user_id
> mirror_trigger_builds
> only_mirror_protected_branches
> mirror_overwrites_diverged_branches
Note: If your HTTP repository is not publicly accessible, add authentication information to the URL: https://username:password@gitlab.company.com/group/project.git where password is a public access key with the api scope enabled
请注意,推送镜像尚未实现:https://gitlab.com/gitlab-org/gitlab-ee/issues/7599
关于api - 如何通过 API 更改 Gitlab 中的镜像设置?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52554811/