Reputation: 674
I am trying to do a curl to basically clone a package.json
in my local directory, by using:
curl -U "<email>":"<pass>" -L "https://github.com/flowrepo/blob/master/package.json"
I managed to get pass the redirect by using the -L
flag, but I cannot get a valid JSON doc as the command above is returning the entire Github page. Any thoughts?
Upvotes: 0
Views: 24
Reputation: 674
[Solved]
Thanks Hans Z. for your answer. This is the final call that works:
curl -U "<email>":"<pass>" -L "https://github.com/flowrepo/raw/master/package.json?token<retrieved_token> -o output.txt
Upvotes: 0
Reputation: 53908
Access the "raw" variant by changing the URL to:
https://github.com/flowrepo/raw/master/package.json"
Upvotes: 1