-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!

2 Answers 2

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.

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.

Not the answer you're looking for? Browse other questions tagged .