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 change bitbucket pipeline default clone directory

Hi all

probably is not a new question, but I didn't find anything useful, then I ask.

I need to change the pipeline default clone directory, that by default is 



I read here and it seems that the variable is:



I tried to set this in Settings >> Pipeline >> Environment page of my bitbucket project, but no way.


What am I doing wrong?

Thanks in advance.



3 answers

I'm looking to checkout the git source repo into a subfolder would that be possible to implement?

Other case: path length limitations on Linux when you are compiling huge amount of source code with a lot of sub-folders like the Linux Kernel using Yocto or Buildroot. 

0 votes
Ana Retamal Atlassian Team Apr 18, 2017

Hi Daniele,

The $BITBUCKET_CLONE_DIR variable is for referencing the path so we have the flexibility to change clone dir if needed. It's for internal use only. It's referenced in the article because you can *use* that variable, but it wouldn't make sense to change the value.

If there's a reason why you consider necessary to change the default clone directory, you can submit a Feature request at so we can consider it for future implementation.

Hope this helps!

Ana Retamal Atlassian Team May 01, 2017

Just to emphasize this in case it wasn't clear enough in my previous comment, the variable is for customers to use but it's read only, it can only be modified by Atlassian.




One use case: We want to test ansible roles using molecule. If the code does not reside in a directory matching the role name, the build fails.

Suggest an answer

Log in or Sign up to answer
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,741 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