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

Fetching file with curl with 2 factor authorization enabled Edited

I am trying to fetch a file from a private repository, a shell script. And I'd like to run it immediately.

I tried with 

curl --user username:pass https://repo_path/ | sh

But I don't get anything. I even tried putting app password, again, nothing.

I tried with 

curl | sh

No luck.


Any ideas how should I do this?


I'm doing this so that the new users can just paste this line in their terminal, and the script will set the project up for them (clone the repo among other things).

1 answer

1 accepted

0 votes
Answer accepted

Ok, I managed to do it, by doing a request to the Bitbucket API, with the correct endpoint and app password.


curl -u username | sh

Suggest an answer

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

Bitbucket Server 7.0 is here!

Hello Community, I’m Anton Genkin, a product manager on the Bitbucket Server and Data Center team and am excited to share that Bitbucket Server 7.0 is now available! It's a platform release, one th...

994 views 6 5
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