您好,我正在尝试使用 gitlab api 创建项目标签,但它一直说标签名称无效。我什至尝试使用 gitlab api 文档中的示例。
这是我的尝试:
➜ /tmp curl -X POST -d @body.json https://mygitlabserver.com/api/v3/projects/9733/repository/tags --header "Content-Type:application/json" -H "PRIVATE-TOKEN:sNW8AGtLMdSGAJiGQ-gV"
{"message":"Tag name invalid"}%
➜ /tmp cat body.json
{
"commit": {
"author_email": "[email protected] /cdn-cgi/l/email-protection",
"author_name": "John Smith",
"authored_date": "2012-05-28T04:42:42-07:00",
"committed_date": "2012-05-28T04:42:42-07:00",
"committer_email": "[email protected] /cdn-cgi/l/email-protection",
"committer_name": "Jack Smith",
"id": "2695effb5807a22ff3d138d593fd856244e155e7",
"message": "Initial commit",
"parents_ids": [
"2a4b78934375d7f53875269ffd4f45fd83a84ebe"
]
},
"message": null,
"name": "v1.0.0",
"release": {
"description": "Amazing release. Wow",
"tag_name": "1.0.0"
}
}
我就是这样工作的
这是一个帖子请求:
curl -X POST -k -H 'PRIVATE-TOKEN: XXXXXXX' \
'https://mygitlabserver.com/api/v3/projects/9733/repository/tags?tag_name=0.0.9&ref=develop'
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)