如何使用单个脚本克隆所有 git bitbucket 存储库

ddc*_*432 0 git rest bash bitbucket

如何使用 bash 脚本检出团队的所有 git bitbucket 存储库?

本主题还有其他问题,但是这些答案中提到的 bitbucket api 不再存在。

Mar*_*ira 5

以下脚本将克隆项目的所有存储库:

for r in $(curl -s --user USER:PASS --request GET https://BITBUCKET-SERVER/rest/api/1.0/projects/PROJECT/repos | jq --raw-output '.values[].links.clone[].href')
do
    git clone $r
done
Run Code Online (Sandbox Code Playgroud)