【发布时间】:2019-01-15 13:38:20
【问题描述】:
我正在尝试使用 curl 和以下命令从 Bitbucket 存储库获取原始文件(我尝试了很多,但我包括最后两个):
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
我有一个文件提交到名为 filename.txt 的主分支
我想获取上述文件的原始版本。我需要什么代码才能得到它?我从这些命令中得到的只是页面包含的 HTML 代码。
注意:对于这种特殊用途,安全性不是问题。我还尝试了以下链接中的解决方案:Download private BitBucket repository zip file using http authentication
【问题讨论】: