@lew
To create a Bitbucket repository using curl
, you can follow these steps:
1
|
curl -X POST -H "Authorization: Basic BASE64_ENCODED_USERNAME_AND_PASSWORD" -H "Content-Type: application/json" -d '{"scm": "git", "is_private": "true", "name": "REPO_NAME"}' https://api.bitbucket.org/2.0/repositories/USERNAME |
Replace BASE64_ENCODED_USERNAME_AND_PASSWORD
with your Base64 encoded username and password. You can generate the Base64 string using websites like https://www.base64encode.org/.
Replace REPO_NAME
with the desired name for your new repository.
Keep in mind that creating repositories via the API will count towards your Bitbucket account's plan limits and will consume your account's resources.