Community Announcements have moved! To stay up to date, please join the new Community Announcements group today. Learn more
×Hello!!
I am getting a 500 reponse every time I try to use the example in de documentation.
The curl is always returning 500.
curl https://api.bitbucket.org/2.0/repositories/username/slug/src \
-F /repo/path/to/image.png=@image.png
{"type":"error","error":{"message":"Something went wrong","id":"0488898c2387461f9ed4a29591a38cf2"}}
I have tried absolutes paths, parameters... How can I debug this error??
Hi @Enrique Fernández-Polo Puertas
Thank you for flagging that.
The example in that document page is incomplete. You should use something like:
curl -u <USER>:<APP_PASSWORD> \
-X POST https://api.bitbucket.org/2.0/repositories/<USER>/<SLUG>/src \
-F <REPO_FILE_NAME>=@"<LOCAL_PATH_TO_FILE>/<FILE_NAME>"
e.g.
curl -u admin:123456 \
-X POST https://api.bitbucket.org/2.0/repositories/admin/repo/src \
-F avatar.png=@"~/my folder/image.png"
I've raised an internal ticket to flag that we need to fix that page.
Please let me know if you are able to upload the file as you wish.
AI-powered meeting notes keep work moving even if you’re out of the office. Enjoy your well-deserved time off and return refreshed, confident you’ll catch up in no time.
Learn more
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.