Hi Guys
trying to set the repository generate by api as private
is_private : true with no success ... im using OAUTH ....
tried to create repo and update (post and put) with no success
with POST
with PUT
I see that there is already question on this with no answer ...
https://community.atlassian.com/t5/Bitbucket-questions/How-to-create-private-repository-via-API-2-0/qaq-p/1202924
Thanks Eyal
Hi @Eyal David ,
It's Norbert here from the other Community question
I would like to inform you the reason why the repository creation is failing is because the "-H "Content-Type: application/json" flag is missing from your call. This flag is needed as we need to specify the content type.
Can I ask you to do an API call like this and let me know if it creates you a private repository?
curl -X POST -H "Authorization: Bearer token" https://api.bitbucket.org/2.0/repositories/workspace/reposlug -H "Content-Type: application/json" -d '{"scm": "git", "is_private": true, "fork_policy": "no_public_forks"}'
Please let me know how it goes, Eyal.
Best Regards,NorbertAtlassian Bitbucket Cloud Support
@Norbert Csupka Thank you very much worked like a charm !!!
You're welcome, I'm glad to hear I was able to help
It looks like you're new here. Sign in or register to get started.