Path variable for Stash contains /root?

My developers recently noticed some odd behavior. After the last restart of our Stash server we are getting the following when pushing / pulling to our Stash repositories:

git -c diff.mnemonicprefix=false -c core.quotepath=false fetch origin
warning: unable to access '/root/.config/git/config': Permission denied
warning: unable to access '/root/.gitconfig': Permission denied
warning: unable to access '/root/.config/git/config': Permission denied
warning: unable to access '/root/.gitconfig': Permission denied

From what I've read this happens if the PATH variable contains '/root/'. How can I resolve this? It's still possible to commit without issue but it's a bit distracting and it'll take extra error handling for writing scripts.

2 answers

1 accepted

Hi Tim,

Do you mind raising a support ticket and attaching your support zip with as much details about how Stash is running? It's most likely running as the wrong user, or with the wrong home or user. I don't think there's anything you can do about the warning until that is fixed - we don't have control over that directly.

Charles

Thanks @Charles. The behavior of the init script we've used since we started using Stash changed. No idea why but it is fixed. :)

For some unknown reason the init script that we've used since installing Stash no longer functioned as it should. The results of my ticket:

If your script is running this: <tt>/bin/su -m $USER -c "$CATALINA_HOME/bin/startup.sh &> /dev/null"</tt> the <tt>-m</tt> is preserving the environment from the calling user who appears to be root.

There are instructions for running Stash as a service that will serve you better. I would recommend using these if you can't get it running.


Suggest an answer

Log in or Join to answer
Community showcase
Piotr Plewa
Published Dec 27, 2017 in Bitbucket

Recipe: Deploying AWS Lambda functions with Bitbucket Pipelines

Bitbucket Pipelines helps me manage and automate a number of serverless deployments to AWS Lambda and this is how I do it. I'm building Node.js Lambda functions using node-lambda&nbsp...

654 views 0 4
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you
Atlassian Team Tour

Join us on the Team Tour

We're bringing product updates and pro tips on teamwork to ten cities around the world.

Save your spot