Request when the git tag already exists but the release name does not
gkrizek$ curl -v -X POST -d '{"tag_name":"v1.0","name":"v9.9.9","body":"Test for GitHub Support"}' -H "Authorization: token e0d9a9axxxxxxxxxxxeea281171c5e04113c" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.30.253.117...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.117) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: Jun 19 00:00:00 2018 GMT
* expire date: Jul 10 12:00:00 2019 GMT
* subjectAltName: host "api.github.com" matched cert's "*.github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> POST /repos/gkrizek/pipeline-test/releases HTTP/1.1
> Host: api.github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: token e0d9a9a72xxxxxxxxxxx281171c5e04113c
> Content-Length: 68
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 68 out of 68 bytes
< HTTP/1.1 422 Unprocessable Entity
< Server: GitHub.com
< Date: Thu, 13 Sep 2018 16:26:38 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 246
< Status: 422 Unprocessable Entity
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4985
< X-RateLimit-Reset: 1536856293
< X-OAuth-Scopes: admin:gpg_key, admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user
< X-Accepted-OAuth-Scopes: repo
< X-GitHub-Media-Type: github.v3; format=json
< Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Content-Security-Policy: default-src 'none'
< X-Runtime-rack: 0.043091
< X-GitHub-Request-Id: FA2A:1A22:FE56DF:2611542:5B9A8FBE
<
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://developer.github.com/v3/repos/releases/#create-a-release"
}
Request when neither the git tag or the release name exists ( Creates the tag from master )
gkrizek$ curl -v -X POST -d '{"tag_name":"notag","name":"v9.9.9","body":"Test for GitHub Support"}' -H "Authorization: token xxxxxxxxxxxxxxxx" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.30.253.116...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.116) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: Jun 19 00:00:00 2018 GMT
* expire date: Jul 10 12:00:00 2019 GMT
* subjectAltName: host "api.github.com" matched cert's "*.github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> POST /repos/gkrizek/pipeline-test/releases HTTP/1.1
> Host: api.github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: token xxxxxxxxxxxxxxxx
> Content-Length: 69
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 69 out of 69 bytes
< HTTP/1.1 201 Created
< Server: GitHub.com
< Date: Thu, 13 Sep 2018 16:35:45 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 1871
< Status: 201 Created
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4999
< X-RateLimit-Reset: 1536860145
< Cache-Control: private, max-age=60, s-maxage=60
< Vary: Accept, Authorization, Cookie, X-GitHub-OTP
< ETag: "47fd94a5d96ec987a92ebf684d609bee"
< X-OAuth-Scopes: repo
< X-Accepted-OAuth-Scopes: repo
< Location: https://api.github.com/repos/gkrizek/pipeline-test/releases/12885484
< X-GitHub-Media-Type: github.v3; format=json
< Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Content-Security-Policy: default-src 'none'
< X-Runtime-rack: 0.642883
< X-GitHub-Request-Id: FAD5:1A25:2E2604E:58022EC:5B9A91E0
<
{
"url": "https://api.github.com/repos/gkrizek/pipeline-test/releases/12885484",
"assets_url": "https://api.github.com/repos/gkrizek/pipeline-test/releases/12885484/assets",
"upload_url": "https://uploads.github.com/repos/gkrizek/pipeline-test/releases/12885484/assets{?name,label}",
"html_url": "https://github.com/gkrizek/pipeline-test/releases/tag/notag",
"id": 12885484,
"node_id": "MDc6UmVsZWFzZTEyODg1NDg0",
"tag_name": "notag",
"target_commitish": "master",
"name": "v9.9.9",
"draft": false,
"author": {
"login": "gkrizek",
"id": 8949695,
"node_id": "MDQ6VXNlcjg5NDk2OTU=",
"avatar_url": "https://avatars1.githubusercontent.com/u/8949695?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gkrizek",
"html_url": "https://github.com/gkrizek",
"followers_url": "https://api.github.com/users/gkrizek/followers",
"following_url": "https://api.github.com/users/gkrizek/following{/other_user}",
"gists_url": "https://api.github.com/users/gkrizek/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gkrizek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gkrizek/subscriptions",
"organizations_url": "https://api.github.com/users/gkrizek/orgs",
"repos_url": "https://api.github.com/users/gkrizek/repos",
"events_url": "https://api.github.com/users/gkrizek/events{/privacy}",
"received_events_url": "https://api.github.com/users/gkrizek/received_events",
"type": "User",
"site_admin": false
},
"prerelease": false,
"created_at": "2018-07-17T16:30:52Z",
"published_at": "2018-09-13T16:35:45Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/gkrizek/pipeline-test/tarball/notag",
"zipball_url": "https://api.github.com/repos/gkrizek/pipeline-test/zipball/notag",
"body": "Test for GitHub Support"
}
* Connection #0 to host api.github.com left intact
Request when both the tag does not exit and the release name exist
gkrizek$ curl -v -X POST -d '{"tag_name":"nonexistent-tag","name":"v9.9.9","body":"Test for GitHub Support"}' -H "Authorization: token xxxxxxxxxxxxxxx" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.30.253.116...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.116) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: Jun 19 00:00:00 2018 GMT
* expire date: Jul 10 12:00:00 2019 GMT
* subjectAltName: host "api.github.com" matched cert's "*.github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> POST /repos/gkrizek/pipeline-test/releases HTTP/1.1
> Host: api.github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: token xxxxxxxxxxxxxxxxxxx
> Content-Length: 79
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 79 out of 79 bytes
< HTTP/1.1 201 Created
< Server: GitHub.com
< Date: Thu, 13 Sep 2018 16:38:15 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 1911
< Status: 201 Created
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4997
< X-RateLimit-Reset: 1536860145
< Cache-Control: private, max-age=60, s-maxage=60
< Vary: Accept, Authorization, Cookie, X-GitHub-OTP
< ETag: "2be7292997b554b3343abc558b6b0f38"
< X-OAuth-Scopes: repo
< X-Accepted-OAuth-Scopes: repo
< Location: https://api.github.com/repos/gkrizek/pipeline-test/releases/12885542
< X-GitHub-Media-Type: github.v3; format=json
< Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Content-Security-Policy: default-src 'none'
< X-Runtime-rack: 0.545086
< X-GitHub-Request-Id: FAF0:1A23:18BFB9A:38BC1CD:5B9A9276
<
{
"url": "https://api.github.com/repos/gkrizek/pipeline-test/releases/12885542",
"assets_url": "https://api.github.com/repos/gkrizek/pipeline-test/releases/12885542/assets",
"upload_url": "https://uploads.github.com/repos/gkrizek/pipeline-test/releases/12885542/assets{?name,label}",
"html_url": "https://github.com/gkrizek/pipeline-test/releases/tag/nonexistent-tag",
"id": 12885542,
"node_id": "MDc6UmVsZWFzZTEyODg1NTQy",
"tag_name": "nonexistent-tag",
"target_commitish": "master",
"name": "v9.9.9",
"draft": false,
"author": {
"login": "gkrizek",
"id": 8949695,
"node_id": "MDQ6VXNlcjg5NDk2OTU=",
"avatar_url": "https://avatars1.githubusercontent.com/u/8949695?v=4",
"gravatar_id": "",
"url": "https://api.github.com/users/gkrizek",
"html_url": "https://github.com/gkrizek",
"followers_url": "https://api.github.com/users/gkrizek/followers",
"following_url": "https://api.github.com/users/gkrizek/following{/other_user}",
"gists_url": "https://api.github.com/users/gkrizek/gists{/gist_id}",
"starred_url": "https://api.github.com/users/gkrizek/starred{/owner}{/repo}",
"subscriptions_url": "https://api.github.com/users/gkrizek/subscriptions",
"organizations_url": "https://api.github.com/users/gkrizek/orgs",
"repos_url": "https://api.github.com/users/gkrizek/repos",
"events_url": "https://api.github.com/users/gkrizek/events{/privacy}",
"received_events_url": "https://api.github.com/users/gkrizek/received_events",
"type": "User",
"site_admin": false
},
"prerelease": false,
"created_at": "2018-07-17T16:30:52Z",
"published_at": "2018-09-13T16:38:15Z",
"assets": [
],
"tarball_url": "https://api.github.com/repos/gkrizek/pipeline-test/tarball/nonexistent-tag",
"zipball_url": "https://api.github.com/repos/gkrizek/pipeline-test/zipball/nonexistent-tag",
"body": "Test for GitHub Support"
}
* Connection #0 to host api.github.com left intact
Request when both tag and release name exist
gkrizek$ curl -v -X POST -d '{"tag_name":"nonexistent-tag","name":"v9.9.9","body":"Test for GitHub Support"}' -H "Authorization: token xxxxxxxxxxxxx" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.30.253.117...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.117) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: Jun 19 00:00:00 2018 GMT
* expire date: Jul 10 12:00:00 2019 GMT
* subjectAltName: host "api.github.com" matched cert's "*.github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> POST /repos/gkrizek/pipeline-test/releases HTTP/1.1
> Host: api.github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: token xxxxxxxxxxxxxx
> Content-Length: 79
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 79 out of 79 bytes
< HTTP/1.1 422 Unprocessable Entity
< Server: GitHub.com
< Date: Thu, 13 Sep 2018 16:39:42 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 246
< Status: 422 Unprocessable Entity
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4996
< X-RateLimit-Reset: 1536860145
< X-OAuth-Scopes: repo
< X-Accepted-OAuth-Scopes: repo
< X-GitHub-Media-Type: github.v3; format=json
< Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Content-Security-Policy: default-src 'none'
< X-Runtime-rack: 0.045347
< X-GitHub-Request-Id: FAFF:1A25:2E36314:582205B:5B9A92CE
<
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://developer.github.com/v3/repos/releases/#create-a-release"
}
* Connection #0 to host api.github.com left intact
Second attempt with a different tag. Tag Name exists but Release Name does not
gkrizek$ curl -v -X POST -d '{"tag_name":"v2.2.2","name":"NEW RELEASE","body":"Test for GitHub Support"}' -H "Authorization: token xxxxxxxxxxxxxxx" https://api.github.com/repos/gkrizek/pipeline-test/releases
Note: Unnecessary use of -X or --request, POST is already inferred.
* Trying 192.30.253.116...
* TCP_NODELAY set
* Connected to api.github.com (192.30.253.116) port 443 (#0)
* ALPN, offering h2
* ALPN, offering http/1.1
* Cipher selection: ALL:!EXPORT:!EXPORT40:!EXPORT56:!aNULL:!LOW:!RC4:@STRENGTH
* successfully set certificate verify locations:
* CAfile: /etc/ssl/cert.pem
CApath: none
* TLSv1.2 (OUT), TLS handshake, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Server hello (2):
* TLSv1.2 (IN), TLS handshake, Certificate (11):
* TLSv1.2 (IN), TLS handshake, Server key exchange (12):
* TLSv1.2 (IN), TLS handshake, Server finished (14):
* TLSv1.2 (OUT), TLS handshake, Client key exchange (16):
* TLSv1.2 (OUT), TLS change cipher, Client hello (1):
* TLSv1.2 (OUT), TLS handshake, Finished (20):
* TLSv1.2 (IN), TLS change cipher, Client hello (1):
* TLSv1.2 (IN), TLS handshake, Finished (20):
* SSL connection using TLSv1.2 / ECDHE-RSA-AES128-GCM-SHA256
* ALPN, server accepted to use http/1.1
* Server certificate:
* subject: C=US; ST=California; L=San Francisco; O=GitHub, Inc.; CN=*.github.com
* start date: Jun 19 00:00:00 2018 GMT
* expire date: Jul 10 12:00:00 2019 GMT
* subjectAltName: host "api.github.com" matched cert's "*.github.com"
* issuer: C=US; O=DigiCert Inc; OU=www.digicert.com; CN=DigiCert SHA2 High Assurance Server CA
* SSL certificate verify ok.
> POST /repos/gkrizek/pipeline-test/releases HTTP/1.1
> Host: api.github.com
> User-Agent: curl/7.54.0
> Accept: */*
> Authorization: token xxxxxxxxxxxxx
> Content-Length: 75
> Content-Type: application/x-www-form-urlencoded
>
* upload completely sent off: 75 out of 75 bytes
< HTTP/1.1 422 Unprocessable Entity
< Server: GitHub.com
< Date: Thu, 13 Sep 2018 16:40:49 GMT
< Content-Type: application/json; charset=utf-8
< Content-Length: 246
< Status: 422 Unprocessable Entity
< X-RateLimit-Limit: 5000
< X-RateLimit-Remaining: 4995
< X-RateLimit-Reset: 1536860145
< X-OAuth-Scopes: repo
< X-Accepted-OAuth-Scopes: repo
< X-GitHub-Media-Type: github.v3; format=json
< Access-Control-Expose-Headers: ETag, Link, Retry-After, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval
< Access-Control-Allow-Origin: *
< Strict-Transport-Security: max-age=31536000; includeSubdomains; preload
< X-Frame-Options: deny
< X-Content-Type-Options: nosniff
< X-XSS-Protection: 1; mode=block
< Referrer-Policy: origin-when-cross-origin, strict-origin-when-cross-origin
< Content-Security-Policy: default-src 'none'
< X-Runtime-rack: 0.051984
< X-GitHub-Request-Id: FB0F:1A24:2385B8F:4AE4318:5B9A9311
<
{
"message": "Validation Failed",
"errors": [
{
"resource": "Release",
"code": "already_exists",
"field": "tag_name"
}
],
"documentation_url": "https://developer.github.com/v3/repos/releases/#create-a-release"
}
* Connection #0 to host api.github.com left intact