Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

error uploading a new file to bitbucket server repo

Meital Ostikar
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
September 20, 2022

Hi, im using the Rest bitbucket api to commit a new file to a branch

I can update an exsising file, but when I try to upload a new file (should be supported by same put method)- I get an error that the fileName was deleted. It doesn't recognize the file- but sure it wont. the file isn't exist yet. I want to create it with a commit.



I use sourceCommitId null as written for uploading a new file


curl -X PUT -u MyServerUserName:MyServerPass -F content='Test adding a file' -F message='Test adding a file' -F branch='TestBranch' -F sourceCommitId=null myServerUri


also tried sourceCommitId=""

0 answers

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events