How can I tell Gitlab to mirror my Github repositories over the API?

旧巷老猫 提交于 2019-12-08 05:13:26

问题


I have seen that the Gitlab WebUI allows to set-up mirroring for repositories from e.g. Github (under MyCoolRepository --> Settings --> Repository --> Mirroring repositories).

I have seen that this is possible over the API, too: https://docs.gitlab.com/ee/api/projects.html#start-the-pull-mirroring-process-for-a-project

Does anyone know how this works and which parameters the API needs for id?

I wanted to automate this process in a script because I do not want to set-up the automatic mirroring for each repository in Gitlab by hand...


回答1:


As the docs specify, you just need to use the project ID, which you can see on:

MyCoolRepository --> Settings --> General

Or use the URL-encoded-path

As far as the docs say, there is no way to set up this miroring configuration.



来源:https://stackoverflow.com/questions/52428297/how-can-i-tell-gitlab-to-mirror-my-github-repositories-over-the-api

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!