Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

SourceTree breaks PATH environment variable

I recently updated SourceTree to version, and it seems to no longer be using the PATH environment variable correctly.  In particular, my commit-msg git hook is failing with the following message:

/usr/bin/env: 'python': No such file or directory

If I modify the script to run as a bash script, and have it `echo $PATH`, I get the following:

/mingw64/libexec/git-core:/mingw64/bin:/usr/bin:/c/Users/n0030352/bin:/c/Users/n0030352/AppData/Local/Atlassian/SourceTree/gitflow_local/gitflow:/bin:/mingw32/bin:/mingw64/bin:/c/Program Files (x86)/Atlassian/SourceTree/tools:/c/Users/n0030352/AppData/Local/Atlassian/SourceTree/git_extras

I get this error using both embedded and system git.

However, if I use the git terminal out of SourceTree, I get the correct PATH variable output, none of which contains SourceTree.  I can also commit just fine.

So my guess is that the PATH variable output by SourceTree contains application-specific modification to the PATH variable, which fails to include the rest of the paths.  For now I am just going to use


3 answers

1 accepted

1 vote
Answer accepted

This has been fixed in

Created bug report STSP-5534

This looks the same as my issue:

How do I vote for this? If I follow the link, it says I don't have permission to view the bug.

Suggest an answer

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

Sourcetree for Windows - CVE-2019-11582 - Remote Code Execution vulnerability

A vulnerability has been published today in regards to Sourcetree for Windows.  The goal of this article is to give you a summary of information we have gathered from Atlassian Community as a st...

5,205 views 0 12
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