こんにちはgitlab apiを使用してプロジェクトにタグを作成しようとしていますが、タグ名が正しくないと言っています。私はgitlab api docのサンプルを使ってみました。ここで 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]",
"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]",
"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"
}
}
ありがとうございましたが、それはまだ同じ ➜/ tmpのカール-X POST -d @ body.json https://mygitlabserver.com/api/です"メッセージ": "タグ名が無効です"}%➜/ tmp cat body(%)/ tmp cat body(%)/ v3/projects/9733/repository/tags - ヘッダー "Content-Type:application/json" -H "PRIVATE-TOKEN:sNW8AGtLMdSGAJiGQ-gV" .json { "message":null、 "名前": "tags/v1.0.0" これは私が試してみたものですと思いますか? \ –
@PramodSetlur https://github.com/gitlabhq/gitlabhq/blob/91fa250038e9182988319f088fb84741b6e2efc9/lib/gitlab/git_ref_validator.rbを修正してトレースを追加して正確なgitコマンドを確認してください実行されます。 – VonC
APIをホストするボックスにアクセスできません。 :/ –