SourceTree Custom Action on Mac returns "launch path not accessible"

I am setting up SourceTree with the same custom actions that work with another installation. For example, I have:

Script target: git

Parameters: clean -fx

When I attempt to invoke the action, I get:

git clean -fx 
launch path not accessible
Completed with errors, see above

It works if I specify the full path of git in the script target: /usr/local/git/bin/git

But I would prefer to not have to specify that in each of the actions.

I have SourceTree configured to use system git with location /usr/local/git/bin/git. But I get the same error if I use embedded git.

I also tried an action:

Script target: /usr/sbin/which

Parameters: git

This also returns the error:

launch path not accessible

What gives?

SourceTree version

Git version 2.5.3

$ defaults read ${HOME}/.MacOSX/environment.plist PATH


6 answers

1 accepted

0 votes
Answer accepted

This issue was somewhat resolved for me at some point. I cannot recall when but at some point git appeared in /usr/bin and I no longer get the launch path error for simple custom commands.

But I just had the same problem with launch path when trying to use a more involved command:

git tag -l | xargs git tag -d && git fetch -t'

To work around the problem, I created an alias:

git config --global --add alias.prunetags '!git tag -l | xargs git tag -d && git fetch -t'

I then made the custom command:

git prunetags


terminal: chmod 0755 path/file
worked for me 

This solved it for me as well

hmm, this doesn't work for me

Example: chmod 0755

A PATH issue seems most likely, but it looks like the correct git location is listed in the PATH. I'm not a Mac user - are the different items in the path supposed to be separated by colons? Semi-colons seem like a more typical delimiter for this sort of thing. Although you'd probably have bigger problems if your PATH is using the wrong delimiter.

Colon is the delimiter in unix-based systems. Is there support for Mac?

Should be, SourceTree features are typically developed for Mac first, then ported to Windows. Sounds like a Mac user needs to take a look at this, or maybe you'll need to try submitting a bug report to get the attention of Atlassian staff.

I'm having the same issue.  Can't figure out how to fix what it is trying to tell me.  Did you ever resolve this?  I tried "/usr/bin/git" as the command and "-C $REPO clean -fxdn" as parameters but still get the "launch path not accessible".  I assume this means it cannot reach the command but I expected using and explicit path would work.  I can certainly execute this from the terminal.  Since I started SourceTree as my user, I'd expect it to have the same permissions.

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Oct 23, 2018 in Sourcetree

Tip from the team: configure your repos for hosting goodness!

Supported Platforms macOS Windows We recently introduced support for additional hosting services such as GitHub Enterprise, GitLab (Cloud, Community Edition, Enterprise Edition), and...

1,205 views 4 2
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