Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×Hi.
I'v trying to fork a boileplate repo and set team ownership. My colleague has it working on his mac. It's not working on Windows.
The code runs. My repo is being forked, but the ownership is set to my user.
It appears that the following code fails:
(The capitalized words are set to the correct values when I execute the code)
shellExec(`curl -D- -u USERNAME:PASSWORD -X POST https://api.bitbucket.org/2.0/repositories/MYTEAM/MYREPO/forks --header 'Content-Type: application/json' --data '{ "name": "NEWREPONAME", "is_private" : true, "project" : { "key" : "UN", "name": "MYPROJECT", "type": "project" }, "owner": { "username": "MYTEAM" } }'`)
I'm getting the following error:
(node:8220) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): SyntaxError: Unexpected token u in JSON at position 0
(node:8220) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.
Any clue as to what is wrong?
Hi Jonas,
Teams can not be set as owners of a repository. This is because teams are no longer accessible with Team ID and password, now every member needs to use their own credentials to access the team. You'll need to choose someone from the team to be the owner of the repository.
Can you try setting a different user and let us know how it goes?
Best regards,
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.