Giter Site home page Giter Site logo

error while uploading about ghup HOT 17 CLOSED

werehamster avatar werehamster commented on July 22, 2024
error while uploading

from ghup.

Comments (17)

wereHamster avatar wereHamster commented on July 22, 2024

Try to capture the actual response code from github. It's not returning a 2xx response, it would be much useful to know what the code actually is.

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

any idea how to find out :-)

i am not familiar with ruby.

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

Just before this line:

die("GitHub doesn't want us to upload the file.") unless res.class == Net::HTTPCreated

add:

puts res.inspect
puts res.body.inspect

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

this is the output

Net::HTTPNotFound 404 Not Found readbody=true
"{"message":"Not Found"}"
GitHub doesn't want us to upload the file.

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

What is the output from this command?

git config --get remote.origin.url

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

https://github.com/DonDavici/DreamPlex.git

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

I just pushed a change (f8cf726), does it work now?

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

sorry. still the same problem :-(

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

Did you supply a valid token to the script? (see the readme)

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

sure. i tried also manually within the script. the token is available.

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

More debugging. In the get_http_request function (line 38+) add:

puts uri.inspect
puts req.inspect

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

you mean puts request.inspect ... right?

this ist the output:

URI::HTTPS:0x8fa8c34 URL:https://api.github.com/repos/DonDavici/DreamPlex/downloads>
Net::HTTP::Post POST>
Net::HTTPNotFound 404 Not Found readbody=true>
"{"message":"Not Found"}"
GitHub doesn't want us to upload the file.

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

Yes. Add also this:

puts params.inspect

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

URI::HTTPS:0x8a17f54 URL:https://api.github.com/repos/DonDavici/DreamPlex/downloads>
Net::HTTP::Post POST>
"{"name":"DP_MainMenu.py","size":"34713","description":"","content_type":"text/x-python"}"
Net::HTTPNotFound 404 Not Found readbody=true>
"{"message":"Not Found"}"
GitHub doesn't want us to upload the file.

from ghup.

pengwynn avatar pengwynn commented on July 22, 2024

If using OAuth, you'll need a token with 'public_repo' scope for a user with push access to the repo in order to create a download via the API.

from ghup.

DonDavici avatar DonDavici commented on July 22, 2024

@pengwynn

thank you very much. that solved the problem for me. :-)

from ghup.

wereHamster avatar wereHamster commented on July 22, 2024

I've added a note to the readme which scopes the OAuth token must include.

from ghup.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.