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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

Bitbucket Cloud cloning Repositories via REST API

Hi there,

Iam curious if its possible to clone a repository via the REST API as I haven't found anything yet. If thats not possible, I would like to ask if its possible to retrieve just the .git folder from a repository.


Many thanks in advance!


Regards Lars 

1 answer

0 votes

Hello @Lars Schweikardt,

Welcome to the Community.

I'm not entirely sure what did you mean by REST API here. You can clone a repository over HTTPS using same credentials as Bitbucket REST API (even using OAuth token, for instance), but it won't actually be REST, as it is defined.

The .git directory is the entire repository (it contains all objects, refs, etc.), so it is exactly the same as cloning a repo. You probably meant clone bare repo without checking out working directory? This is a client-side operation, i.e. Git first fetches the whole repo, then it can create a working directory for you. See Git clone documentation for details.

If you describe what you're actually trying to achieve, I might come up with other hints.

Hope this helps. Let me know if you have any questions. 


Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

464 views 4 4
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