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.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.