Hello Team,
I am trying to push multiple files into bitbucket cloud repository. When I try to add files more than 100 units, I am getting 400 Bad request.
curl -X POST --header "Authorization: Basic <Auth key>=" --header "Content-Type: multipart/form-data" --form "message=Commiting 1000 * 1MB files" --form "branch=main" --form "testFiles//file_100.txt=@"testFiles/file_100.txt";filename="file_100.txt"" --form "testFiles//file_10.txt=@"testFiles/file_10.txt";filename='file_10.txt'" --form "testFiles//file_11.txt=@"testFiles/file_11.txt";filename='file_11.txt'" --form "testFiles//file_12.txt=@"testFiles/file_12.txt";filename='file_12.txt'" --form "testFiles//file_13.txt=@"testFiles/file_13.txt";filename='file_13.txt'"
...
...
--form "testFiles//file_98.txt=@"testFiles/file_98.txt";filename='file_98.txt'" --form "testFiles//file_99.txt=@"testFiles/file_99.txt";filename='file_99.txt'" --form "testFiles//file_9.txt=@"testFiles/file_9.txt";filename='file_9.txt'" "https://api.bitbucket.org/2.0/repositories/v-test/test/src"
Response:
<!doctype html>
<html lang="en">
<head>
<title>Bad Request (400)</title>
</head>
<body>
<h1>Bad Request (400)</h1><p></p>
</body>
</html>
May I know the limitations in bitbucket cloud on number of files committed and removed in single commit request.
Also are there any recent changes regarding these limits as I remember committing more than 300 files in a single request.
Please help me in understanding this.
Thanks in advance.
Hello @Gokul Rajan ,
Thank you for reaching out to the Community!
This limitation seems to be applied when committing through the API only.
In this case, if you would like to upload that many files at once, I would suggest cloning the repository locally and using git to commit and push your changes, as git will be able better manage the commit of multiple files.
Would it be possible for you to try pushing from your local using git instead of the API and let us know how it goes?
Thank you, @Gokul Rajan !
Patrik S
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.