You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.
View groupJoin the community to find out what other Atlassian users are discussing, debating and creating.
Hi all,
I'm trying to automate my bitbucket repo creation via a bash script and am stuck on the following endpoint
/2.0/repositories/{workspace}/{repo_slug}/pipelines_config
I'm trying the following:
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true
}'
which I thought would be the same as going 'Repository Settings > Pipeline > Settings > Enable Pipeline'
but this returns :
{"type": "error", "error": {"message": "Resource not found"}}
I've also tried a few variations:
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true
}'
curl -X PUT -v -u "$BITBUCKET_AUTH_EMAIL":"$BITBUCKET_AUTH_PASS" -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories/$BITBUCKET_USER/$REPO_SLUG/pipelines_config -d \
'{
"enabled": true,
"type": "repository_pipelines_configuration"
}'
but these also return the above result.
Other than that i've been able to setup pipeline vars & pipeline key pair without any issues so any help pointing me in the right direction would be appreciated.
After contacting support the issue was resolved by using the users Bitbucket username instead of
BITBUCKET_AUTH_EMAIL
in the authentication.
Can confirm to reproduce if my app-password has all the needed rights.
If not, I get an error message back telling me which rights are missing. However if I try to change that (e.g. wrong repository slug), the error message stays the same, only for credentials.
The missing resource error is only shown if credentials are fine. I have no idea why it does not work. Also tried with GET first.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If you already heard about Smart Commits in Bitbucket, know that you just stumbled upon something even better (and smarter!): Genius Commits by Better DevOps Automation for Jira Data Center (+ Server...
Connect with like-minded Atlassian users at free events near you!
Find an eventConnect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.
Host an eventYou're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.