Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
4,293,410
Community Members
 
Community Events
165
Community Groups

How to set PATH for git invocation from Sourcetree?

Edited

Does anybody know how to set the PATH environment variable that Sourcetree on macOS uses when invoking git?

Background: For years I have been using a tool called git-remote-dropbox to store git repos for personal projects within my Dropbox account.  These repos are accessed using a dropbox:// URI and git automatically calls the git-remote-dropbox Python script when encountering a remote with such a URI.  It works beautifully...but only if git can find the git-remote-dropbox script.

In the past, opening Sourcetree from the command line with the stree command would cause it to inherit the PATH from the shell, and it would then be able to find the script.

An OS update forced some reworking of the Python installation and I had to reinstall the script to a different path.  I updated PATH in my shell configuration, and the system git can find the script in the new location when invoked from the shell.  But Sourcetree does not seem to be inheriting the new PATH, and git invocations from within Sourcetree can't find the script in the new location.  This is true for both embedded git and system git.

Sourcetree must be getting its PATH from somewhere, but I can't figure out where, or how to set it.  Anybody know?

Workaround:  Further experimentation revealed that /usr/local/bin is on the path seen by git when invoked from Sourcetree, so I got things running by adding a symlink to git-remote-dropbox in /usr/local/bin.  But I'd still like to know if there's a way to configure Sourcetree's PATH variable for git invocation.

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Sourcetree

Bug Fix: Sourcetree for Windows authentication error when updating to app password

Hello Sourcetree users!!! With the recent removal of Bitbucket Cloud account passwords for app passwords (please see our Bitbucket Cloud community post for details on why we made this change for se...

60,274 views 127 26
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