bash - GitHub 问题创建 API

标签 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

我做错了什么? http://developer.github.com/v3/issues/#create-an-issue

最佳答案

您似乎没有在您的 curl 请求中调用 POST

您至少可以尝试(遵循“REST-esting with cURL”):

curl -X POST -i -d '{"title":"my-new-repo","body":"my new issue description"}' https://api.github.com/repos/np98765/BattleKits/issues

使用 -i 查看响应 header 。

关于bash - GitHub 问题创建 API,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13324052/

相关文章:

Github错误: src refspec BRANCHNAME does not match any

regex - 使用正则表达式 Grep 多个文件以指定要搜索的文件名

linux - BASH shell 脚本在命令提示符下工作正常,但不适用于 crontab

C++ LibCurl 发送 HTTPS 请求

PHP/ curl : delete cookie created with CURLOPT_COOKIEJAR

php - 检查 cURL 输出 PHP

Github:对私有(private)存储库的只读访问,以便分布式部署到客户设备

linux - 使用 sed/bash 删除左右方括号

linux - 读取输入而不回显不起作用(bash Shell 脚本)

github - $ git commit --amend 不改变/保存提交信息