Skip to content

Instantly share code, notes, and snippets.

@sohayb
Created December 14, 2015 15:27
Show Gist options
  • Select an option

  • Save sohayb/5410f03f0a2d95f4cfb2 to your computer and use it in GitHub Desktop.

Select an option

Save sohayb/5410f03f0a2d95f4cfb2 to your computer and use it in GitHub Desktop.

Revisions

  1. sohayb created this gist Dec 14, 2015.
    9 changes: 9 additions & 0 deletions getAllRepos.sh
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,9 @@
    #!/bin/bash
    #Script to get all repositories under a user from bitbucket
    #Usage: getAllRepos.sh [username] [password]

    curl --user ${1}:${2} https://api.bitbucket.org/1.0/users/${1} > repoinfo
    for repo_name in `grep \"name\" repoinfo | cut -f4 -d\"`
    do
    git clone https://${1}@bitbucket.org/${1}/$repo_name
    done