curl api.github.com发布发布JSON问题

问题描述:

所以重要的是,github api告诉我我的JSON是不正确的。curl api.github.com发布发布JSON问题

{ 
    "tag_name":"v1.1.32-3", 
    "target_commitish":"develop", 
    "name":"v1.1.32-3", 
    "body":"Checkout the latest commit for details!", 
    "draft":false, 
    "prerelease":true 
} 

我已经通过JSON验证程序运行它,它说JSON是有效的。 我看过; How to create and publish a Release using GitHub API v3 with curl?

我使用

curl -H "Authorization: token blah" 
    -H "Content-Type: application/json" 
    -H "Accept: application/vnd.github.v3+json" 
    https://api.github.com/repos/$username/$projectName/releases 
    -d '(JSON ABOVE)' 

而且不管我怎么变JSON,我似乎无法改变从GitHub的响应。我使用它来自动化一些发布,并且我已经完成了大约60次迭代,试图使这个工作没有任何成功的执行。

我建立的OAuth令牌我用在这里:https://github.com/settings/tokens

出愤怒的我给我使用可除PGP权限许可每次OAuth凭证。

这里是卷曲版本的第一台机器我想这:

curl 7.52.1 (x86_64-pc-linux-gnu) libcurl/7.52.1 OpenSSL/1.0.2l zlib/1.2.8 libidn2/0.16 libpsl/0.17.0 (+libidn2/0.16) libssh2/1.7.0 nghttp2/1.18.1 librtmp/2.3 

Protocols: dict file ftp ftps gopher http https imap imaps ldap ldaps pop3 pop3s rtmp rtsp scp sftp smb smbs smtp smtps telnet tftp 

Features: AsynchDNS IDN IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 

Annnndddd第二机

curl 7.54.1 (x86_64-unknown-linux-gnu) libcurl/7.54.1 OpenSSL/1.1.0f zlib/1.2.11 libpsl/0.17.0 (+libicu/59.1) libssh2/1.8.0 nghttp2/1.23.1 

Release-Date: 2017-06-14 

Protocols: dict file ftp ftps gopher http https imap imaps pop3 pop3s rtsp scp sftp smb smbs smtp smtps telnet tftp 

Features: AsynchDNS IPv6 Largefile GSS-API Kerberos SPNEGO NTLM NTLM_WB SSL libz TLS-SRP HTTP2 UnixSockets HTTPS-proxy PSL 

我的使用情况下,使用此与詹金斯自动执行某些版本的东西,由于我用CURL花了大约6个小时,并且无法使用它,所以我设法安装了https://github.com/aktau/github-release,它完美地工作。我将继续并将此标记为已解决...