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

Use UNC path to store Stash Home on windows

I got our networked storage for Stash set up finally. I copied the stash-home directory to the new location, updated the environment variable and started the server. However, whenever Stash tries to enter a git command there is an error message

"C:\Program Files (x86)\Git\cmd\git.exe" clone --bare -
-shared \\drive\stash\stash-home\data\repositories\24 \\drive\stash\stas
h-home\data\repositories\51
Cloning into bare repository '\\drive\stash\stash-home\data\repositories\51'
...
fatal: '\drive\stash\stash-home\data\repositories\24' does not appear to be
a git repository
fatal: Could not read from remote repository.

I logged into the machine, and found that

>git clone \\drive\stash\stash-home\data\repositories\24

has that error message but

>git clone //drive/stash/stash-home/data/repositories/24

works perfectly. I tried setting the STASH_HOME variable to both //drive/stash/stash-home and \\drive\stash\stash-home, but both options seemed to work the same. How could I overcome this so that the git repos are on our backed up storage?

2 answers

1 accepted

0 votes
Answer accepted

Unfortunately, if Stash is running non-interactively as a service, mapping a network drive is not an option.

As it turns out, there is a relatively simple workaround for this. Use the mklink command to create a symbolic link to the networked location, and then point Stash at the symlink.

ThiagoBomfim Atlassian Team Apr 01, 2014

Hi Paul,

Thanks for your feedback. I updated the article with your suggestion.

Best regards,

Thiago Bomfim

Atlassian Support

0 votes
ThiagoBomfim Atlassian Team Mar 31, 2014

Hi Paul,

If you set up a UNC path for our STASH_HOME directory (e.g. \\myfileserver\sourcecode) you will have issues. You should change it to a mapped network drive instead you will avoid issues.

Please use this Knowledge Base article as a referrence:

Please also observe the length of the path might cause you issues.

I hope this helps you.

Best regards,

Thiago Bomfim

Atlassian Support

Suggest an answer

Log in or Sign up to answer
TAGS
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 ...

1,527 views 0 6
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