Skip to content

Instantly share code, notes, and snippets.

@hancengiz
Created June 19, 2019 11:51
Show Gist options
  • Save hancengiz/73ed1bfeeb3a9459cee2e75d1dda0a59 to your computer and use it in GitHub Desktop.
Save hancengiz/73ed1bfeeb3a9459cee2e75d1dda0a59 to your computer and use it in GitHub Desktop.
clone all repos under a bitbucket project
echo Hello, enter username
read username
curl --user $username https://bitbucketservername/rest/api/1.0/projects/PRJ1/repos | jq -r '.values[].links.clone[] | select(.name == "ssh").href' > repo_urls
for repo_url in `cat repo_urls `
do
echo git clone $repo_url
git clone $repo_url
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment