【问题标题】:how to download all files in a private git repo in bash如何在 bash 中下载私有 git 存储库中的所有文件
【发布时间】:2016-02-23 14:48:00
【问题描述】:

试过这个:

TOKEN="bla"
wget -r --no-parent  --reject "index.html*" https://api.github.com/repos/organiztion/RepoName/contents/Framework/deploy_scripts/ --header "Authorization: token $TOKEN" --header 'Accept: application/vnd.github.v3.raw'

我得到一个包含目录中所有文件列表的文件。我想要实际的文件而不是列表。

而不是编写一个 bash 脚本来循环文件并下载所有文件。

我更喜欢“原始”的解决方案,意思是 wget 或 curl 而不是 svn,拜托。

【问题讨论】:

    标签: bash curl github wget


    【解决方案1】:

    Github 让您有机会使用 SVN 获取 repo。 SVN 只允许您下载 repo 子文件夹的内容。

    看看这个帖子:Download a single folder or directory from a GitHub repo

    【讨论】:

    • 不想每次都填写我的用户名和密码。 svn 支持 ssh 吗?你知道通过 wget 或 curl 做到这一点的方法吗?
    • 也许这会奏效(我目前无法尝试,如果有效,请告诉我):svn checkout svn+ssh://github.com/foobar/Test/trunk/foo。我认为 curl 或 wget 不可能,但我不是 git 专家。
    猜你喜欢
    • 1970-01-01
    • 2014-08-19
    • 2016-05-10
    • 2021-05-25
    • 1970-01-01
    • 2017-02-03
    • 2018-10-13
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多