Showing results for 
Search instead for 
Did you mean: 
Sign up Log in
Deleted user
0 / 0 points
badges earned

Your Points Tracker
  • Global
  • Feed

Badge for your thoughts?

You're enrolled in our new beta rewards program. Join our group to get the inside scoop and share your feedback.

Join group
Give the gift of kudos
You have 0 kudos available to give
Who do you want to recognize?
Why do you want to recognize them?
Great job appreciating your peers!
Check back soon to give more kudos.

Past Kudos Given
No kudos given
You haven't given any kudos yet. Share the love above and you'll see it here.

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

stash repository path on linux

How can I know the repository path on linux?

I choiced "/var/atlassian/stash/data/repositories" as repository root path.
Then I created some projects and repositories.
Now I want to edit hook script, but I cannot know the target repository's path.
(Some numbering directory(1, 2, 3... not project and repository name) exist in repositries directory)


  • scientific linux 6.0
  • stash 1.1.1 with hsqldb

5 answers

1 accepted

1 vote
Answer accepted
jhinch Atlassian Team Aug 07, 2012

To help mitigate this issue we've created a plugin for Stash, the Repository System Info Plugin. It allows system administrators to view the location on disk of the repository through the Stash UI.

EDIT: As of 2.7 you can view this information on the repository settings page.

Is there a way to access the location via calling the plugin in Hook code? trying to get the repository directory from the post recieve hook to modify a file in the Hook code.


Sameer Jaffer

2 votes
seb Atlassian Team Jul 16, 2012


There is currently no way in Stash to determine where a repository lives on disk without peeking into the database and looking at the repository id.

There is an open feature request to make repositories on disk easier to find.



thanks for response :)

Also Thank your for this information!

I would say the numbers relate to the repository id internally in stash.

You might have to use the stash REST API to find the repository id out though

Which api do I need to use in ?

I tried to use "{projectKey}/repos/{repositorySlug} ", but I couldn't get the repository id.
curl -u xxx:xxx -X GET -H "Content-Type: application/json" http://localhost:7990/stash/rest/api/1.0/projects/TEST/repos/repo

1 vote

Since Stash 2.1, the repository id is also returned from the REST API.

curl -u admin:admin -X GET http://localhost:7990/stash/rest/api/latest/projects/PROJECT_1/repos/rep_1

Will now return:

    "name":"Project 1",
    "description":"Default configuration project #1",

The above url did not work for me, but http://localhost:7990/stash/rest/api/latest/projects/PROJECT_1/repos/rep_1 gave output aproximately as above.

The following did not work for me. Any clue ?

curl -u username:password -X GET http://localhost:7990/stash/rest/api/latest/projects/U3SI/repos/repo/dom-2010

Looks like the URL I provided had an extra /repo/ in the path that shouldn't have been there. I've fixed my comment with the correct URL.


curl -u username:password -X GET http://localhost:7990/stash/rest/api/latest/projects/U3SI/repos/dom-2010

Compare the directories in refs/heads to what you see in Stash GUI. If needed, dig a little deeper and compare the commit hash to last commit in Stash GUI.

Example: given a path <stash_home>/data/repositories/<some #>/refs/heads,

run ls to obtain a dir listing

compare output to Stash GUI Repository by clicking Repositories at top, by default it shows Files. Then click the directory drop down button directly underneath to show all dirs.

If your projects use a similar directory layout --

run less against one of the files listed using ls earlier.

compare hash against Stash GUI by clicking Commits (next to Files.) Usually the short code listed is fine, but you can click on it to obtain the full hash.

Suggest an answer

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

Bitbucket Pipelines Runners is now in open beta

We are excited to announce the open beta program for self-hosted runners. Bitbucket Pipelines Runners is available to everyone. Please try it and let us know your feedback. If you have any issue...

777 views 15 10
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