SourceTree command line tools installation failed


  • OS X Yosemite 10.10.5
  • SourceTree Version

I click SourceTree > Install Command Line Tools, enter my password and get the following error message:


    Installation failed

    Unable to install command line tools, please refer to the system logs for more details.


Then a second one:


    Installation failed

    Failed to install command line tools, please see the system log for details.


Any guidance to solve this problem?



15 answers

This has been annoying me for a while. Here's a workaround that works for me:

$ ln -s /Applications/ /usr/local/bin/

I use homebrew, so /usr/local/bin is already in my path and owned by me (instead of root)

Thanks for posting this workaround.  It worked great for me!

This is what I was looking for. Thank you.

Thanks for the workaround! Cheers.

Works for me! Thanks!

There is a bug opened for this  - follow it.

1 vote

What does the system log say?

In, I was able to find the following log message:


    10/12/15 10:20:15.599 AM SourceTree[2892]: Failed to install privileged helper: Error Domain=CFErrorDomainLaunchd Code=4 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 4.)"


Is there any other place to look for?

That usually means you don't have the right permissions to install the software. Are you running the installation with a privileged account?

Yes, it is an administrator account

Ok, you probably need to expand on the error a little to find out what it was failing to do. I've seen a very similar (different numbers, but the rest was the same) error when trying to install on a Mac with no admin access, but it went through fine when I became an admin. So I'm afraid I might be stuck

I don't know if its relevant but there's also a spindump message: 10/13/15 11:05:50.955 AM spindump[385]: Saved spin report for SourceTree version ( to /Library/Logs/DiagnosticReports/SourceTree_2015-10-13-110550_sofia.spin Which links to the following report: Date/Time: 2015-10-13 11:05:43 +0200 OS Version: 10.10.5 (Build 14F27) Architecture: x86_64 Report Version: 21 Command: SourceTree Path: /Applications/ Version: ( PID: 838 Event: spin-lite Duration: 6.40s (process was unresponsive for 2 seconds before sampling) Steps: 65 (100ms sampling interval) Hardware model: iMac8,1 Active cpus: 2 Fan speed: 699 rpm Heaviest stack for the main thread of the target process: 65 ??? (SourceTree + 8704) [0x10c521200] 65 NSApplicationMain + 1832 (AppKit + 12868) [0x7fff82606244] 65 -[NSApplication run] + 594 (AppKit + 551667) [0x7fff82689af3] 65 -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 346 (AppKit + 593496) [0x7fff82693e58] 65 _DPSNextEvent + 1828 (AppKit + 596989) [0x7fff82694bfd] 65 _NSHandleCarbonMenuEvent + 277 (AppKit + 1420512) [0x7fff8275dce0] 65 _HandleMenuSelection2 + 446 (HIToolbox + 614654) [0x7fff90f670fe] 65 MenuSelectCore(MenuData*, Point, double, unsigned int, OpaqueMenuRef**, unsigned short*) + 702 (HIToolbox + 615553) [0x7fff90f67481] 65 FinishMenuSelection(SelectionData*, MenuResult*, MenuResult*) + 96 (HIToolbox + 612873) [0x7fff90f66a09] 65 SendMenuItemSelectedEvent + 188 (HIToolbox + 613168) [0x7fff90f66b30] 65 SendMenuCommandWithContextAndModifiers + 59 (HIToolbox + 613261) [0x7fff90f66b8d] 65 SendHICommandEvent(unsigned int, HICommand const*, unsigned int, unsigned int, unsigned char, void const*, OpaqueEventTargetRef*, OpaqueEventTargetRef*, OpaqueEventRef**) + 428 (HIToolbox + 360261) [0x7fff90f28f45] 65 SendEventToEventTarget + 40 (HIToolbox + 122038) [0x7fff90eeecb6] 65 SendEventToEventTargetInternal(OpaqueEventRef*, OpaqueEventTargetRef*, HandlerCallRec*) + 386 (HIToolbox + 32686) [0x7fff90ed8fae] 65 DispatchEventToHandlers(EventTargetRec*, OpaqueEventRef*, HandlerCallRec*) + 1260 (HIToolbox + 35692) [0x7fff90ed9b6c] 65 NSSLMMenuEventHandler + 724 (AppKit + 2346347) [0x7fff8283fd6b] 65 -[NSCarbonMenuImpl _carbonCommandProcessEvent:handlerCallRef:] + 107 (AppKit + 3258546) [0x7fff8291e8b2] 65 -[NSMenu _internalPerformActionForItemAtIndex:] + 35 (AppKit + 3258982) [0x7fff8291ea66] 65 -[NSMenu performActionForItemAtIndex:] + 131 (AppKit + 3259136) [0x7fff8291eb00] 65 _os_activity_initiate + 75 (libsystem_trace.dylib + 3287) [0x7fff8522bcd7] 65 -[NSCarbonMenuImpl performActionWithHighlightingForItemAtIndex:] + 114 (AppKit + 2443644) [0x7fff8285797c] 65 -[NSMenuItem _corePerformAction] + 382 (AppKit + 2444366) [0x7fff82857c4e] 65 -[NSApplication sendAction:to:from:] + 452 (AppKit + 2444977) [0x7fff82857eb1] 65 _os_activity_initiate + 75 (libsystem_trace.dylib + 3287) [0x7fff8522bcd7] 65 ??? (SourceTree + 208875) [0x10c551feb] 65 ??? (SourceTree + 613396) [0x10c5b4c14] 64 ??? (SourceTree + 612533) [0x10c5b48b5] 60 ??? (SourceTree + 611828) [0x10c5b45f4] 60 AuthorizationCreate + 151 (Security + 742023) [0x7fff84062287] 60 xpc_connection_send_message_with_reply_sync + 200 (libxpc.dylib + 32169) [0x7fff83844da9] 60 semaphore_wait_trap + 10 (libsystem_kernel.dylib + 70938) [0x7fff921d651a] *60 semaphore_wait_continue + 0 (kernel + 1353536) [0xffffff800034a740] Binary Images: 0x10c51f000 - 0x10c7c1fff com.torusknot.SourceTreeNotMAS ( <05BD6566-0F56-3C43-BB9B-7EC796720431> /Applications/ 0x7fff82603000 - 0x7fff83184fff 6.9 (1348.17) <E485D56D-3E72-34B7-99BB-BFDEE2D07BF5> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff8383d000 - 0x7fff83865fff libxpc.dylib (559.40.1) <5C829202-962E-3744-8B50-00D38CC88E84> /usr/lib/system/libxpc.dylib 0x7fff83fad000 - 0x7fff84223fff 7.0 (57031.40.6) <FCCCC4FD-043A-30CA-9997-4211CA0E9297> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff8522b000 - 0x7fff85231fff libsystem_trace.dylib (72.20.1) <840F5301-B55A-3078-90B9-FEFFD6CD741A> /usr/lib/system/libsystem_trace.dylib 0x7fff90ed1000 - 0x7fff911d6fff 2.1.1 (758.7) <E3129A67-BDF9-333D-9C9C-A95C8F0EF71C> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x7fff921c5000 - 0x7fff921e2fff libsystem_kernel.dylib (2782.40.9) <16AD15EF-3DAE-3F63-9D26-26CCE1920762> /usr/lib/system/libsystem_kernel.dylib *0xffffff8000200000 - 0xffffff80009fffff kernel (2782.40.9) <58F06365-45C7-3CA7-B80D-173AFD1A03C4> /System/Library/Kernels/kernel

Hi Any progress with this? I have OSX 10.10.4 and SourceTree:

I'm getting the same error on OSX 10.11 and SourceTree In the case of OSX 10.11, could it be related to the System Integrity Protection (SIP/rootless) feature of 10.11?

My log message shows as below: 22/10/15 15:54:22,535 smd[540]: App "com.torusknot.SourceTreeNotMAS" did not pass helper check "com.atlassian.SourceTreePrivilegedHelper2". 22/10/15 15:54:22,536 SourceTree[9128]: Failed to install privileged helper: Error Domain=CFErrorDomainLaunchd Code=4 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 4.)" 22/10/15 15:59:11,367 smd[540]: App "com.torusknot.SourceTreeNotMAS" did not pass helper check "com.atlassian.SourceTreePrivilegedHelper2". 22/10/15 15:59:11,367 SourceTree[9128]: Failed to install privileged helper: Error Domain=CFErrorDomainLaunchd Code=4 "The operation couldn’t be completed. (CFErrorDomainLaunchd error 4.)"

I am facing the same issue. Have you figured out a solution yet?

Still a problem in SourceTree Version 2.2.2 (51), but a little different. Now the application just quits unexpectedly.

Workaround ( ) seems to still work.


Any solutions, or bugs raise on the sourcetree project?

I'm getting the same error. Oddly, I just downloaded / installed the latest version a few minutes ago... and, this (very obvious bug) is still not fixed! WOW!

I'm as well getting this error. Any update on this?

Same, this is still a problem in 2.2.3 (56)

I'm seeing the same problem with 2.3. It's disappointing that Atlassian has not fixed this. I have a number of other apps that install command-line tools with no problem.

Making a symlink to the stree binary in the application, as Philip Borenstein suggested earlier, is a good solution:

ln -s /Applications/ /usr/local/bin/

I had to add the file to Applications manually and then it worked.

The proposed workaround doesn't work for me. I use home-brew as well

Just got this error with my first use of Sourcetree. Not very auspicious...

I installed the app through a download from the website. I have no idea how to "check the logs".

Also, the app installed itself into my user directory's Application folder, so the path for the workaround suggested by Philip Borenstein is a bit different. Other than that, it worked.

If the stree link doesn't work, manually download and install the mercurial command line tools for from here, not the SoureTree website:

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
Published May 11, 2018 in Sourcetree

Tip from the team: debugging Sourcetree

Supported Platforms macOS Windows If you're reading this and it's not just educational… we know you're unhappy right now and apologize for that   We're dedicated to improving yo...

706 views 10 6
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