-1

I am trying to download a file from my git repository onto a VM, and I do so running the following command:

curl -O "https://git.com/projects/RENG/repos/test.sh" -k

After I run this command I see that the file that gets downloaded to my machine is actually the "html" source code, and not the script itself. How do I change this so that the script is downloaded. Also, I don't want to use git commands because I want to download this as root, as part of another script.

Thanks for your help!

user2019182
  • 39
  • 1
  • 7

2 Answers2

2

Either clone the git repo as @alexises suggests which is the most general solution or if you're actually using github.com you can get to the files directly on https://raw.github.com which is explained more fully here.

chicks
  • 3,793
  • 10
  • 27
  • 36
1

You must clone the repo to get the file, it's a common case in a packaging environement. If you have a security issue you can fork, remove your capability and dowload the file under a non privilaged user.

alexises
  • 131
  • 2