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 Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 06, 2018 in Bitbucket

Do you use Bitbucket Cloud and Jira Cloud? If so, let us know!

Hi Community, I'm Julia and I'm on the Jira Software Cloud marketing team!  We're looking for companies or teams using Bitbucket Cloud and Jira Software Cloud. If your team fits the t...

129 views 6 3
Join discussion

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