werehamster / ghup Goto Github PK
View Code? Open in Web Editor NEWThis tool no longer works. Stop starring and watching it!
This tool no longer works. Stop starring and watching it!
I would like to get a github link like this one:
https://github.com/downloads/somebody/somerepo/somefile.ext
Not like this:
https://github.s3.amazonaws.com/downloads/somebody/somerepo/somefile.ext
Is it possible?
Thanks
Users shouldn't have to run this cryptic curl command themselves. Ideally the script would detect that the token is missing and create it automatically.
I've had a problem when trying to run this if the certificate cant be verified. Now i'm not a ruby expert, but adding the following fixed it for me.
def post(url, token, params, headers)
uri = URI.parse(url)
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
http.verify_mode = OpenSSL::SSL::VERIFY_NONE
req = Net::HTTP::Post.new(uri.path, headers)
req['Authorization'] = "token #{token}" if token
return http.request(req, params)
end
Addition is the "http.verify_mode = OpenSSL::SSL::VERIFY_NONE" to disable the verification.
Whenever I upload a file using ghup, the resulting download is shorter than the file I uploaded.
Hi
i was searching for a long time for script as yours. Thank you very much for your efforts on this.
unfortnuately it does not work for me.
i get always the following error:
{"message":"Not Found"}GitHub doesn't want us to upload the file.
message not found comes from "print res.body one line before the error message itself in your script.
any ideas on this?
thx in advance
There's a typo in one error message: "doens't" โ "doesn't"
I try to use this nice script in travis-ci, and noticed there is error in regex parsing since the remote url there is
git://github.com/larrycai/sdcamp
repo = ARGV[1] || `git config --get remote.origin.url`.match(/[email protected]:(.+?)\.git/)[1]
BTW: Now I can give my repo name as input to across this.
It would be beneficial to have an additional parameter to the script for a "description" of the file.
At present it fails in a way that's hard to diagnose.
A very simple fix, which gives an obvious error message and has an obvious fix for most users likely to use this script, is simply to change the hash-bang line to:
Even if there's no ruby1.9 on the user's system with Ruby 1.9 installed, it's obvious what the intention is, and e.g. on my Ubuntu system, I'd just change it to ruby1.9.3.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.