Created
November 29, 2015 15:25
-
-
Save jubianchi/50a2db7b6d0b95a14468 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
export TRAVIS_TOKEN=travisCIIsMagic | |
export SHOU_BUILD_BODY="{ \ | |
\"request\": { \ | |
\"branch\": \"master\", \ | |
\"config\": { \ | |
\"env\": { \ | |
\"global\": { \ | |
\"foo\": \"bar\" \ | |
} \ | |
} \ | |
} \ | |
} \ | |
}" | |
echo $SHOU_BUILD_BODY | |
curl -s -X POST \ | |
-H "User-Agent: atoum" \ | |
-H "Content-Type: application/json" \ | |
-H "Accept: application/json" \ | |
-H "Travis-API-Version: 3" \ | |
-H "Authorization: token \"$TRAVIS_TOKEN\"" \ | |
-d "$SHOU_BUILD_BODY" \ | |
https://api.travis-ci.org/repo/atoum%2Fshou/requests |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ "request": { "branch": "master", "config": { "env": { "global": { "foo": "bar" } } } } } | |
* Trying 54.83.200.251... | |
* Connected to api.travis-ci.org (54.83.200.251) port 443 (#0) | |
* TLS 1.2 connection using TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 | |
* Server certificate: *.travis-ci.org | |
* Server certificate: COMODO RSA Domain Validation Secure Server CA | |
* Server certificate: COMODO RSA Certification Authority | |
* Server certificate: AddTrust External CA Root | |
> POST /repo/atoum%2Fshou/requests HTTP/1.1 | |
> Host: api.travis-ci.org | |
> User-Agent: atoum | |
> Content-Type: application/json | |
> Accept: application/vnd.travis-ci.3+json | |
> Travis-API-Version: 3 | |
> Authorization: token "travisCIIsMagic" | |
> Content-Length: 117 | |
> | |
} [117 bytes data] | |
* upload completely sent off: 117 out of 117 bytes | |
< HTTP/1.1 403 Forbidden | |
< Connection: keep-alive | |
< Server: nginx | |
< Date: Sun, 29 Nov 2015 15:23:29 GMT | |
< Content-Type: text/html;charset=utf-8 | |
< Content-Length: 13 | |
< Status: 403 Forbidden | |
< Access-Control-Allow-Origin: * | |
< Access-Control-Allow-Credentials: true | |
< Access-Control-Expose-Headers: Content-Type, Cache-Control, Expires, Etag, Last-Modified | |
< Strict-Transport-Security: max-age=31536000 | |
< X-Oauth-Scopes: | |
< Vary: Accept-Encoding | |
< X-Rack-Cache: invalidate, pass | |
< Via: 1.1 vegur | |
< | |
{ [13 bytes data] | |
* Connection #0 to host api.travis-ci.org left intact | |
access denied |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment