• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • 4.1.5
    • General
    • None
    • Severity 2 - Major

      I am running macOS 12.1 on a M1 MacBook. The "Install Command Line Tools" command fails.

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

      This is probably a permissions error. Sourcetree seems not to request elevated permissions to modify `/usr/local`, which it needs to.

            [SRCTREE-7794] "Install Command Line Tools" fails

            Fixed in 4.2.3

            Arati Mohanty added a comment - Fixed in 4.2.3

            Hi aadb32a11bf4  We have worked on the fix and it will be available in upcoming version of SourceTree.

            Arati Mohanty added a comment - Hi aadb32a11bf4   We have worked on the fix and it will be available in upcoming version of SourceTree.

            I ran into this problem today as I'm setting up a new Mac at work. In addition to not being able to install the `stree` command line tool, things such the ability to run BBEdit as an external editor (for diff'ing, for example) don't seem to work, either. I'm not sure whether that is related to the `stree` tool not being available or not. On my non-work Mac, where I've been using SourceTree for a while (and thus some of these things might have been "grandfathered in", the ability to add and use external tools doesn't seem to work (I've set them but when I try to use them, nothing happens). I use BBEdit as my external diff tool. It's set but selecting it does nothing on the Mac where I can't install `stree`.

            Mike Puckett added a comment - I ran into this problem today as I'm setting up a new Mac at work. In addition to not being able to install the `stree` command line tool, things such the ability to run BBEdit as an external editor (for diff'ing, for example) don't seem to work, either. I'm not sure whether that is related to the `stree` tool not being available or not. On my non-work Mac, where I've been using SourceTree for a while (and thus some of these things might have been "grandfathered in", the ability to add and use external tools doesn't seem to work (I've set them but when I try to use them, nothing happens). I use BBEdit as my external diff tool. It's set but selecting it does nothing on the Mac where I can't install `stree`.

            bc763189c49a  you can install the command line tools from terminal. To do so please

            1. Run command "xcode-select --install" from terminal.
            2. Click install button in the dialog popup.
            3. On installation complete, you can verify it with terminal command "xcode-select -p". Also you should see the folder under  /Library/Developer/CommandLineTools

            Arati Mohanty added a comment - bc763189c49a   you can install the command line tools from terminal. To do so please Run command "xcode-select --install" from terminal. Click install button in the dialog popup. On installation complete, you can verify it with terminal command "xcode-select -p". Also you should see the folder under  /Library/Developer/CommandLineTools

            Frank Mena added a comment -

            Can I get an answer to:

            Is there a way to manually install the command line tools?

             

            Thank you.

             

            Frank Mena added a comment - Can I get an answer to: Is there a way to manually install the command line tools?   Thank you.  

            noledgy added a comment -

            Still not solved on macOS 13.2.1  Sourcetree 4.2.2

            Tried the alexreg workaround. I can run stree from the terminal, no problem.

            Is there a way to manually install the command line tools?

             

             

            noledgy added a comment - Still not solved on macOS 13.2.1  Sourcetree 4.2.2 Tried the alexreg workaround. I can run stree from the terminal, no problem. Is there a way to manually install the command line tools?    

            Evrins added a comment -

            @Arti Mohanty  work around provided by alexreg works. but this issue has been there for years. please fix it, it only needs a few lines. 

            Evrins added a comment - @Arti Mohanty  work around provided by alexreg works. but this issue has been there for years. please fix it, it only needs a few lines. 

            ecddccfbd6e7 Thank you for reaching out to us. We would like you to please try above mentioned work arounds for now. We will work on this and update our findings here.

            Arati Mohanty added a comment - ecddccfbd6e7 Thank you for reaching out to us. We would like you to please try above mentioned work arounds for now. We will work on this and update our findings here.

            Evrins added a comment -

            still not solved on macOS 13.2 Sourcetree 4.2.0(246)

             

            Evrins added a comment - still not solved on macOS 13.2 Sourcetree 4.2.0(246)  

            alexreg added a comment - - edited

            I just looked into this issue again, and it seems that all that the GUI is doing when you install the command-line tool is creating a symlink in `/usr/local/bin`. The error arises when `/usr/local` is not owned by the current user, which is very possible, and really shouldn't be assumed by the GUI.

            Anyway, the easy solution to create the symlink is to run the following from the shell.

            sudo ln -s "/Applications/Sourcetree.app/Contents/Resources/stree" /usr/local/bin/

            Of course, this only needs to be done once, and will persist through updates.

            alexreg added a comment - - edited I just looked into this issue again, and it seems that all that the GUI is doing when you install the command-line tool is creating a symlink in `/usr/local/bin`. The error arises when `/usr/local` is not owned by the current user, which is very possible, and really shouldn't be assumed by the GUI. Anyway, the easy solution to create the symlink is to run the following from the shell. sudo ln -s "/Applications/Sourcetree.app/Contents/Resources/stree" /usr/local/bin/ Of course, this only needs to be done once, and will persist through updates.

              43c951f935c6 Raman Sidarakin (Inactive)
              ca17d04d6a23 alexreg
              Affected customers:
              7 This affects my team
              Watchers:
              14 Start watching this issue

                Created:
                Updated:
                Resolved: