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 command line tools installation failed

Yann Oct 09, 2015

Context:

  • OS X Yosemite 10.10.5
  • SourceTree Version 2.0.5.3

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?

 

Yann

15 answers

30 votes
Philip Borenstein Dec 16, 2015

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

$ ln -s /Applications/SourceTree.app/Contents/Resources/stree /usr/local/bin/

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

Kevin Peters Jan 17, 2016

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

Brett Jones Feb 11, 2016

This is what I was looking for. Thank you.

Alberto Forni Mar 13, 2016

Thanks for the workaround! Cheers.

Akos Maurer-Somogyi Mar 21, 2016

Thanks, it works!

Kevin Kirchner May 16, 2017

Works for me! Thanks!

khan.fan@oriente.com Jun 13, 2018

great. it works. Thanks a lot.

Wander Lima Feb 02, 2019

Thanks!! ;)

4 votes

There is a bug opened for this https://jira.atlassian.com/browse/SRCTREE-3172  - follow it.

1 vote
Nic Brough [Adaptavist] Community Leader Oct 09, 2015

What does the system log say?

Yann Oct 11, 2015

In Console.app, 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?

Nic Brough [Adaptavist] Community Leader Oct 12, 2015

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

Yann Oct 12, 2015

Yes, it is an administrator account

Nic Brough [Adaptavist] Community Leader Oct 12, 2015

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

Yann Oct 13, 2015

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 2.0.5.3 (2.0.5.3) 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/SourceTree.app/Contents/MacOS/SourceTree Version: 2.0.5.3 (2.0.5.3) 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 2.0.5.3 (2.0.5.3) <05BD6566-0F56-3C43-BB9B-7EC796720431> /Applications/SourceTree.app/Contents/MacOS/SourceTree 0x7fff82603000 - 0x7fff83184fff com.apple.AppKit 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 com.apple.security 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 com.apple.HIToolbox 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

Mike James Oct 19, 2015

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

Kris Baker Oct 19, 2015

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

Chetan Sachdev Oct 23, 2015

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.)"

1 vote
Chetan Sachdev Oct 22, 2015

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

1 vote
Philip Borenstein Feb 24, 2016

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

Workaround (https://answers.atlassian.com/questions/31657961/answers/32988936 ) seems to still work.

 

0 votes
Yann Oct 22, 2015

No

0 votes

Any solutions, or bugs raise on the sourcetree project?

0 votes
Joe Johnson Dec 15, 2015

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!

0 votes
Nikolaj Andersen Feb 23, 2016

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

0 votes
Olivier Andriessen Mar 20, 2016

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

0 votes
Russell Owen May 17, 2016

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/SourceTree.app/Contents/Resources/stree /usr/local/bin/
0 votes
Ninan John Nov 21, 2016

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

0 votes
Marvin Ellis Jan 26, 2017

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

0 votes
Geoffrey Emerson Mar 09, 2017

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.

0 votes
Nancy Benovich Gilby Aug 03, 2017

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

https://www.mercurial-scm.org/wiki/Download

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Sourcetree

[dev team] Sourcetree for Windows 2019 Preview - Dark Theme

Hi folks, While the full post is over on our blog I'd like to share the dark theme we've got planned for 2019 here directly as well to keep the discussion going.  The ...

1,935 views 14 18
Join discussion

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