as part of my organization monthly git-maintenance we use the following command in a shell script to delete branches in bitbucket
curl -u id:password -H Content-Type:application/json https://bitbucket.organisation.com/rest/branch-utils/1.0/projects/projectname/repos/${REPO_NAME}/branches -X DELETE --data "{\"name\": \"refs/heads/${gitbranch}\",\"dryRun\": \"false\"}"
any idea how I can get a bitbucket token to delete as im not comfortable using my id:password in a script stored in out local servers.
Thanks !!
Hello,
You can get a token by clicking on "Manage Account" on your profile picture on the upper right. There you can find "Personal access tokens" sections.
Regards.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.