Hi,
I would like to know whether it is possible to create a bitbucket repository using the REST API. If so, can you please post the curl command I have to use? Thanks!
Community moderators have prevented the ability to post new answers.
I managed to do by myself, thanks!
curl -k -X POST --user user:pass "https://api.bitbucket.org/1.0/repositories" -d "name=project_name"
after create repo how can add user to thıs repo ...?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
If anyone still looking for the answer, Please use following REST query
curl -s -u user:passwd -k --header "Content-Type: application/json" -X PUT "https://bitbucket.**.com/rest/api/1.0/projects/{project-KEY}/repos/{REPO NAME}/permissions/groups?permission=REPO_WRITE&name={GROUP NAME}"
Available repository permissions are:
REPO_READ
REPO_WRITE
REPO_ADMIN
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Still it didnt worked out for my case:
My requirement : Project already manually created( SGIN), but i need to create repo only using curl and my repo name should be orange
curl -X POST -v -u username:password -H "Content-Type: application/json" \
https://api.bitbucket.org/2.0/repositories \
-d '{"scm": "git", "is_private": "false","project": {"key": "SGIN"}, "name":"orange" }'
but my https:// is differ and how would it will create under my projects?
my https://bitbucket-apac12.aws.es.com/scm/sgin/
Can anyone help me out ?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.