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

Download a file in a location of a bitbucket server project repo


I want to download a single file from a repo that's on a Bitbucket server. Is there any example API that I can use? 


3 answers

Navigate to the file you want to download using Bitbucket Server's "Source" view (e.g.,  Once you've identified the file you want to download, look for the "Raw File" link.

Example:  (notice the "Raw File" link?).

These links go to my demo Bitbucket server instance.  They might require that you login.  If so, the username is "test" and the password is "test".

p.s.  I invite you to try my Bitbucket and JIRA add-ons.  Bit-Booster Commit Graph and More (for Bitbucket), and Git Graph for JIRA.

We use Bitbucket Server Archive Plugin to download single files during our automated build process.

Having this plugin installed on your Bitbucket server you can locally retrieve single files (or a selection of files or all files ...) from Bitbucket via a simple git archive ...

For mor details see:

This might be slightly irrelevant, but for binary files, there is a workaround


  1. in your browser, navigate to where the file is
  2. click on the file
  3. click on the option "view raw"
  4. you will be promoted to downloading the file


Most other files can also be downloaded similarly, you can use "open raw" option and save the promoted new tab, textual files will be saved in the format you want.

This technique won't be working for me :/

How do you do this from bash? Is there a rest endpoint for that?

BitBucket Archive plugin is outdated.

W_ AdT I'm New Here Nov 06, 2020

For any file:

  1. in your browser, navigate to where the file is, YES
  2. click on the file, YES
  3. "..." then DO NOT CLICK on the option "view raw" (otherwise you will have a html file);
    Instead, you should RIGHT CLICK the "view raw" in that web menu, then "Save link as..." in browser context menu
  4. You got your real raw file

Suggest an answer

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

Powering DevOps with Bitbucket Server & Data Center

Hi everyone, The Cloud team recently announced 12 new DevOps features that help developers ship better code, faster   ! While we’re all excited about the new improvements to Bitbucket ...

2,154 views 0 7
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