-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
github-asset fails to upload #1
Comments
Workaround: --- xxx 2015-09-04 01:16:09.704558643 +0200 +++ /usr/lib/python2.7/site-packages/github_release.py 2015-09-04 01:11:46.750523838 +0200 @@ -123,7 +123,7 @@ response = request('POST', 'https://uploads.github.com/repos/{0}/releases/{1}/assets?name={2}'.format(repo_name, release['id'], basename), headers={'Content-Type':'application/octet-stream'}, - data=f.read()) + data=f.read(), verify=False) response.raise_for_status() def gh_asset_erase(repo_name, tag_name, pattern): |
Hey Jürgen, I noticed the same thing, but I haven't yet found out what's causing it. It used to work ;-) and comparing Github's API docs to the code, the bug doesn't immediately jump out at me. |
|
Qualys SSL labs gives an A+ rating: https://www.ssllabs.com/ssltest/analyze.html?d=uploads.github.com |
OK, I dove into it some more. I created a release, which was overdue:
And as you can see on github and on PyPI, it worked. I guess what I'm saying is: I can't reproduce it, but I agree there is a bug, because I saw it happen too. I hate bugs that magically disappear... |
Hmm, I am running into more issues, maybe I just don't have the proper setup? uploading ./img/xUbuntu_14.04-owncloud-8.1.2-17.1-201509072043-DEBUG.raw.zip /usr/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning release v8.1.2-17.1-201509072043: uploading ./img/xUbuntu_14.04-owncloud8.1.2-17.1-201509072043-DEBUG.raw.zip /usr/lib/python2.7/site-packages/requests/packages/urllib3/util/ssl_.py:90: InsecurePlatformWarning: A true SSLContext object is not available. This prevents urllib3 from configuring SSL appropriately and may cause certain SSL connections to fail. For more information, see https://urllib3.readthedocs.org/en/latest/security.html#insecureplatformwarning. InsecurePlatformWarning /usr/lib/python2.7/site-packages/requests/packages/urllib3/connectionpool.py:768: InsecureRequestWarning: Unverified HTTPS request is being made. Adding certificate verification is strongly advised. See: https://urllib3.readthedocs.org/en/latest/security.html InsecureRequestWarning) Error sending POST to https://uploads.github.com/repos/owncloud/vm/releases/1779018/assets?name=xUbuntu_14.04-owncloud-8.1.2-17.1-201509072043-DEBUG.raw.zip < POST /repos/owncloud/vm/releases/1779018/assets?name=xUbuntu_14.04-owncloud-8.1.2-17.1-201509072043-DEBUG.raw.zip < Accept : */* < Accept-Encoding : gzip, deflate < Connection : keep-alive < Content-Length : 660807496 < Content-Type : application/octet-stream < User-Agent : python-requests/2.7.0 CPython/2.7.6 Linux/3.11.10-29-desktop < < 'PK\x03\x04-\x00\x00\x00\x08\x00Q\xa6\'G\x8cH+"\xff\xff\xff\xff\xff\xff\xff\xff8\x000\x00xUbun' (total 660807496 bytes of data) > 404 Not Found > Cache-Control : no-cache > Content-Length : 129 > 404 Not Found > Cache-Control : no-cache > Content-Length : 129 > Content-Security-Policy : default-src 'none' > Content-Type : application/json; charset=utf-8 > Date : Mon, 07 Sep 2015 21:43:00 GMT > Strict-Transport-Security : max-age=31557600 > X-Content-Type-Options : nosniff > X-Frame-Options : deny > X-Github-Media-Type : github.v3 > X-Github-Request-Id : 6916f9a0-55a9-11e5-8657-a4cbd6e71a9a > X-Xss-Protection : 1; mode=block > > '{"message":"Not Found","request_id"' (total 129 bytes of data) - done |
So in the error you originally posted, you got presented a certificate for githubusercontent.com, but connected to uploads.github.com. In the second error which you just posted, there are SSL warnings, but ultimately the connection goes through, only the URL posted to appears to be wrong -- or maybe there's a problem with the .netrc? I tested yesterday against Python 2.7.9 and requests 2.7.0. If I read the documentation of the warning right, upgrading to Python 2.7.9 should fix at least the InsecurePlatformWarnings, is that possible for you? It sounds like it could be related to the original error as well, like if the OpenSSL library you use doesn't support SNI, you could unexpectedly get presented a different certificate. But I've a feeling that upgrading Python won't make the 404 go away. Can you maybe upgrade to githubrelease 1.4.3a0 and post the output of |
@jnweiger Let us know if this is still a problem. In the mean time, I am closing this issue. |
Here are few examples of output: ``` $ githubrelease release jcfr/sandbox list release 'nightly' info Tag name : nightly Name : nightly (updated on 20170212) ID : 5427736 Created : 2017-02-01T07:31:19Z URL : https://github.com/jcfr/sandbox/releases/tag/nightly Author : jcfr Is published : True Is prerelease : True Asset #0 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl Downloads : 0 Asset #1 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl Downloads : 0 Asset #2 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl Downloads : 0 Asset #3 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl Downloads : 0 Asset #4 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl Downloads : 0 Asset #5 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl Downloads : 0 Asset #6 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl Downloads : 0 Asset #7 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl Downloads : 0 ``` ``` $ githubrelease ref jcfr/sandbox list --verbose Reference 'refs/heads/master' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 Reference 'refs/tags/nightly' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 ``` ``` $ githubrelease release jcfr/sandbox create my-tag created 'my-tag' release Tag name : my-tag ID : 5427757 Created : 2017-02-11T06:23:39Z URL : https://github.com/jcfr/sandbox/releases/tag/untagged-cfccf5564b71b4d4a2a0 Author : jcfr Is published : False Is prerelease : False ```
Here are few examples of output: ``` $ githubrelease release jcfr/sandbox list release 'nightly' info Tag name : nightly Name : nightly (updated on 20170212) ID : 5427736 Created : 2017-02-01T07:31:19Z URL : https://github.com/jcfr/sandbox/releases/tag/nightly Author : jcfr Is published : True Is prerelease : True Asset #0 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win32.whl Downloads : 0 Asset #1 name : sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp27-cp27m-win_amd64.whl Downloads : 0 Asset #2 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win32.whl Downloads : 0 Asset #3 name : sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp34-cp34m-win_amd64.whl Downloads : 0 Asset #4 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win32.whl Downloads : 0 Asset #5 name : sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp35-cp35m-win_amd64.whl Downloads : 0 Asset #6 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl size : 52 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win32.whl Downloads : 0 Asset #7 name : sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl size : 56 uploader : jcfr URL : https://github.com/jcfr/sandbox/releases/download/nightly/sandbox-4.12.0.dev20170212-cp36-cp36m-win_amd64.whl Downloads : 0 ``` ``` $ githubrelease ref jcfr/sandbox list --verbose Reference 'refs/heads/master' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 Reference 'refs/tags/nightly' Object type : commit sha : 0616014562f225a86469fffe39219536a53b56b1 ``` ``` $ githubrelease release jcfr/sandbox create my-tag created 'my-tag' release Tag name : my-tag ID : 5427757 Created : 2017-02-11T06:23:39Z URL : https://github.com/jcfr/sandbox/releases/tag/untagged-cfccf5564b71b4d4a2a0 Author : jcfr Is published : False Is prerelease : False ```
I just ran into the same problem:
Can you reopen this? |
@Flamefire Thanks for reporting the issue. Could you provide more details about the context leading to the error ?
|
I'm using this on travis: https://travis-ci.com/Flamefire/release-tests/jobs/151523149
|
It seems to work for newer python (3.6): https://travis-ci.com/Flamefire/release-tests/jobs/151600878 |
Thanks for the additional details. I am trying to reproduce now. |
I tried to reproduce the problem downloading the docker image associated with the build reporting a failure but I couldn't reproduce the problem.
And then execute the following without problem:
|
Is this consistently reproducible ? If you are restart the build, does it happen again ? |
Yes it is. I made a separate test repo for this (https://travis-ci.com/Flamefire/travis_test) and reported this to the travis team (travis-ci/travis-ci#10233) I'm not very familiar with SSL certificates but I think that there might be some caching breaking this (Github reports wrong certificate, travis stores this and fails to use a newer one) or that it is due to the issues with SSL on Python 2.7:
|
Closing. We will be transitioning the continuous integration to GitHub Actions (or CircleCI) |
Affter pip install githubrelease, I am trying to upload a new file into an existing release tag.
I get the following error:
The text was updated successfully, but these errors were encountered: