Created
April 26, 2021 06:19
-
-
Save d3vAdv3ntur3s/d4c785154844dc1f94b2983ff4df0193 to your computer and use it in GitHub Desktop.
Hosted Bitbucket Clone v1 API
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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