Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save d3vAdv3ntur3s/d4c785154844dc1f94b2983ff4df0193 to your computer and use it in GitHub Desktop.
Save d3vAdv3ntur3s/d4c785154844dc1f94b2983ff4df0193 to your computer and use it in GitHub Desktop.
Hosted Bitbucket Clone v1 API
Older hosted version of Bitbucket 1.0 api
Using token generated via your user settings instead of username password option.
```
curl -H "Authorization: Bearer GENERATE-TOKEN-HERE" \
"$HOSTED_BITBUCKET_URL/rest/api/1.0/projects/BTT/repos?limit=1000" | \
jq -r '.values[].links.clone[] | select(.name=="http") | .href' | \
xargs -n1 git clone
```
Instead of token to use basic auth:
```
-u $username:$password
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment