I am trying to get a raw file from a Bitbucket repository using curl with the following commands (I have tried many but I am including the last two):
curl -L -O https://user:password@bitbucket.org/username/repository/branch/HEAD/filename.txt
curl -L -O https://user:password@bitbucket.org/username/repository/branch/raw/filename.txt
I have a file committed to the master branch called filename.txt
I want to get the raw version of the above file. What code do I need to get that? All I get from these commands is the HTML code that the page contains.
Note: Security isn't an issue for this particular usage. I have also tried solutions in the following link: Download private BitBucket repository zip file using http authentication