Bash GitHub问题创建API

Bash GitHub问题创建API,bash,curl,github,Bash,Curl,Github,我正在尝试使用GitHub存储库创建一个问题: curl -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues 这只是返回: { "message": "Not Found" } 我是这样认证的: curl -u "user:password" https://api.github.com 我做错了什么?

我正在尝试使用GitHub存储库创建一个问题:

curl -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues
这只是返回:

{
  "message": "Not Found"
}
我是这样认证的:

curl -u "user:password" https://api.github.com
我做错了什么?
您似乎没有在
curl
请求中调用
POST

您至少可以尝试(在“”之后):

使用
-i
查看响应标题。

刚刚尝试了
curl-u“$REPORTER”:“$TOKEN”https://api.github.com/repos/$OWNER/$REPO/issues-d@$JSON_和_ISSUE
成功了


这使用令牌身份验证,reporter是我的用户,而repo的所有者是我报告问题的用户。

curl在使用
-d
时应该始终使用POST。@surendar可能API已更改?但我的答案似乎仍然符合。这里也有同样的问题。你找到原因了吗?
curl -X POST -i -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues