-1

I want to be able to download a github release (a jar file) and put it in a certain directory on my VPS (running Ubuntu 16.04). How would you go about doing this?

Adding the "shell" tag as I think you'd need to use shell

1 Answers1

0

See this discussion: Download single files from GitHub

In the past, I've used something like:

wget -O filename.jar https://github.com/downloads/user/repository/filename.jar?raw=true

That will place the jar file in your current directory if you run it from your Ubunutu VPS.

Community
  • 1
  • 1
linuxdave
  • 16
  • 1
  • 2
  • 1
  • Do you know how to run some sort of script to download it every time my machine starts up? – ItsEternity Jul 25 '16 at 18:30
  • If you'd like to perform this every time your machine starts, I'd recommend adding a @reboot cron task. Start by editing your cron: `crontab -e` and then add a line like the following: `@reboot wget -O filename.jar https://github.com/downloads/user/repository/filename.jar?raw=true`. The easiest way to find the URL you need is to browse Github in a browser, find the file, and then click the link to view the "RAW" version, and copy that URL. – linuxdave Jul 25 '16 at 18:34
  • How does the URL work? Say I want to download this https://github.com/Eluinhost/UHC/releases jar file. How do I do that? – ItsEternity Jul 25 '16 at 18:34