Reputation: 21
So essentialy, the github api tells me my JSON is incorrect.
{
"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
}
I've run that through a JSON verifier and it says the JSON is valid. I've looked at; How to create and publish a Release using GitHub API v3 with curl?
I'm using
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)'
And no matter how I change the JSON, I cannot seem to change the response from github. I'm using this to automate some publishing and I've gone through about 60 iterations of trying to get this to work without any sucess with this command.
I created the OAUTH token I'm using here: https://github.com/settings/tokens
Out of exasperation I gave the OAUTH token I'm using every permission available except for the PGP permissions.
Here is the CURL version for the first machine I tried this on:
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 the second machine
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
Upvotes: 1
Views: 134
Reputation: 21
My use case was using this to automate some release stuff with Jenkins, Since I spent about 6 hours with CURL and couldn't get it to work, I managed to install https://github.com/aktau/github-release and it works perfectly. I'm going to go ahead and mark this as solved...
Upvotes: 1