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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to upload a file to my bitbucket repo using api?

I want to upload a file like readme and .gitignore via api to bitbucket api. I am using version 1.0. 

Command I am using: 

curl --user name:password -X POST https://bitbucket-test.<company_name>.com/rest/api/1.0/projects/<project_name>/repos/test-1/src -F /tmp/mybamboowork/input.json=@input.json

 

But I get - 

Warning: setting file input.json failed!
curl: (26) read function returned funny value

 

Also, I am able to create repo using api 1.0 but if I want to use 2.0 its not working for me. 

2.0 enforce me to use base url as api.bitbucket.org but we are having base url as bitbucket-test.<company_name>.com. 

 

I am quite confused, please advise

 

1 answer

0 votes

Hi! 

Did you find a solution?

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,818 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you