我创建了一个触发器(使用设置/ CI_CD 页面)。 触发器下面的说明告诉我要使用版本3 API来调用它(当然,我将token变量设置为触发器部分中指定的token):
curl -X POST \
-F token=${TOKEN} \
-F ref=master \
https://gitlab.com/api/v3/projects/2313008/trigger/builds
仅返回:
{"error":"404 Not Found"}
我还尝试遵循API v4文档:
curl --request POST \
--form token=${TOKEN} \
--form ref=master \
https://gitlab.com/api/v4/projects/2313008/trigger/pipeline
返回相同错误。
是否需要任何其他设置?