【发布时间】:2015-08-27 12:28:20
【问题描述】:
根据general instruction to the github.com API和explanation of the create command
curl -u "krichter722" https://api.github.com # works (returns JSON response)
curl -d '{"name":"test"}' https://api.github.com/user/repos/
应该可以工作并创建一个存储库,但是第二个命令失败了
{
"message": "Not Found",
"documentation_url": "https://developer.github.com/v3"
}
我找到了Using `curl` to create a repo on GitHub.com with two-factor authentication,它解决了由于双重身份验证请求中缺少部分而导致的问题。
其他问题,如"Bad Credentials" when attempting to create a GitHub repo through the CLI using curl,表明URL是正确的(在这种情况下,根据错误消息,由于凭据错误,创建失败)。
【问题讨论】:
标签: github github-api