gitlab api标签创建错误 [英] gitlab api Tag creation error
本文介绍了gitlab api标签创建错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用gitlab api为项目创建标签,但一直说标签名称无效.我什至尝试在gitlab api文档中使用示例.
Hi I am trying to create a tag to a project using the gitlab api, but it keeps saying tag name not valid. I even tried using the sample in gitlab api doc.
这是我的尝试:
➜ /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": "john@example.com",
"author_name": "John Smith",
"authored_date": "2012-05-28T04:42:42-07:00",
"committed_date": "2012-05-28T04:42:42-07:00",
"committer_email": "jack@example.com",
"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'
这篇关于gitlab api标签创建错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文