• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • 4.1.6
    • Git
    • None
    • Severity 2 - Major

      I am using Sourcetree 4.1.6 on a M1 Mac without rosetta 2.

      All things works fine, but I have to switch from the embedded git to the System git (provided by apple).

      % /Applications/SourceTree.app/Contents/Resources/git_local/bin/git
      zsh: bad CPU type in executable: /Applications/SourceTree.app/Contents/Resources/git_local/bin/git 

      My main problem is, that I have to use git-crypt. The previous hack with 

      sudo ln -s /opt/homebrew/bin/git-crypt /Applications/SourceTree.app/Contents/Resources/git_local/bin/git-crypt 

      didn't work in the case of system git.

      In case of system git with git-crypt (at console is it working), I got the error:

      'git status' failed with code 128:'"git-crypt" clean: git-crypt: command not found
      error: external filter '"git-crypt" clean' failed 127
      error: external filter '"git-crypt" clean' failed
      fatal: _secrets/filessss_: clean filter 'git-crypt' failed
      '

      (I don't understand why system git with system git-crypt not work in sourcetree, but I think that is another problem.)

      I think the issue could be resolved, if sourcetree embedd an arm64 git solution.

            [SRCTREE-7851] M1: embedded git don't work

            The fix for this issue is available in Sourcetree 4.2.4.
            You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website.
            Thanks.

            Raman Sidarakin (Inactive) added a comment - The fix for this issue is available in Sourcetree 4.2.4. You could upgrade your Sourcetree via "Check For Updates" feature or directly download it from official website. Thanks.

            bb4d585cfa61 

            If I understood correctly you are talking about popup which appears when you adding GitHub account to Sourcetree and authorising Sourcetree to access repositories on your account and organisations.

            This permission is required to request list of all repositories from your account and repositories from organisations you added on GitHub. This list of repos could be accessed via "Remote" tab inside Sourcetree. It provides ability to easily clone this repo using "Clone" button.

            So, basically Sourcetree requesting the next authorization scopes: read:user, user:email, repo, read:org, admin:public_key. Here is reference to GitHub Authorization scopes: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps in case you want more details about which information could be accessed with these authorization scopes.

            Raman Sidarakin (Inactive) added a comment - bb4d585cfa61   If I understood correctly you are talking about popup which appears when you adding GitHub account to Sourcetree and authorising Sourcetree to access repositories on your account and organisations. This permission is required to request list of all repositories from your account and repositories from organisations you added on GitHub. This list of repos could be accessed via "Remote" tab inside Sourcetree. It provides ability to easily clone this repo using "Clone" button. So, basically Sourcetree requesting the next authorization scopes: read:user, user:email, repo, read:org, admin:public_key. Here is reference to GitHub Authorization scopes: https://docs.github.com/en/apps/oauth-apps/building-oauth-apps/scopes-for-oauth-apps in case you want more details about which information could be accessed with these authorization scopes.

            sumit added a comment -

            Hi 43c951f935c6
            Thanks for the quick response , 
            the solution worked for me, 
            I have one doubt , if you clear up that for me I would be greatful, 
            I am using Sourcetree for my organisations git use, so it asks permission for my organisation data.
            The msg pop-up is 
            By requesting this approval, you are asking owners of the ** organization to allow this application to access private organization data and modify public organization data.
            So, will this give a breach of data, or how it is ?

            sumit added a comment - Hi 43c951f935c6 ,  Thanks for the quick response ,  the solution worked for me,  I have one doubt , if you clear up that for me I would be greatful,  I am using Sourcetree for my organisations git use, so it asks permission for my organisation data. The msg pop-up is  By requesting this approval, you are asking owners of the  **  organization to allow this application to access private organization data and modify public organization data. So, will this give a breach of data, or how it is ?

            Hi, bb4d585cfa61

            After analysing it a little bit I have kind of theory related to this.

            It looks like few git binaries embedded in Sourcetree are not having slice for arm64 architecture due to some reason. So when Sourcetree invoking this git binary system could not launch it because it's only x86_64 architecture and Rosetta 2 is not installed on fresh macOS machine by default.

            Could you please try to execute this command from terminal and provide output here in comments?

            arch -x86_64 zsh

            It looks like manipulations performed by a215657da841 are resulted in installing Rosetta 2 and it started working. In case my assumption is correct we still need identify which embedded binaries exactly causing this issue. We will continue working on this to have more details.

            Raman Sidarakin (Inactive) added a comment - - edited Hi, bb4d585cfa61 After analysing it a little bit I have kind of theory related to this. It looks like few git binaries embedded in Sourcetree are not having slice for arm64 architecture due to some reason. So when Sourcetree invoking this git binary system could not launch it because it's only x86_64 architecture and Rosetta 2 is not installed on fresh macOS machine by default. Could you please try to execute this command from terminal and provide output here in comments? arch -x86_64 zsh It looks like manipulations performed by a215657da841 are resulted in installing Rosetta 2 and it started working. In case my assumption is correct we still need identify which embedded binaries exactly causing this issue. We will continue working on this to have more details.

            @sumit Probably XCode setup `git` for me correctly, I'm not sure. Something fixed this problem. So I didn't change anything manually 

            glushchenko added a comment - @sumit Probably XCode setup `git` for me correctly, I'm not sure. Something fixed this problem. So I didn't change anything manually 

            Hi, bb4d585cfa61 

            Could you please share the error message you are receiving?

            Meanwhile could you please try to configure Sourcetree to use System Git? For configuring this you could open Sourcetree settings -> Git -> Use System Git. Then select git binary which is presented inside your system (most probably it will be /usr/bin/git). 

            Please, let me know if it helped or not. Also, please, provide error message, it may help to analyse this issue in correct direction.

            Thanks.

            Raman Sidarakin (Inactive) added a comment - Hi, bb4d585cfa61   Could you please share the error message you are receiving? Meanwhile could you please try to configure Sourcetree to use System Git? For configuring this you could open Sourcetree settings -> Git -> Use System Git. Then select git binary which is presented inside your system (most probably it will be /usr/bin/git).  Please, let me know if it helped or not. Also, please, provide error message, it may help to analyse this issue in correct direction. Thanks.

            sumit added a comment -

            Hi 2566180e0bc8 / 43c951f935c6
            I am also facing the same issue downloaded the latest sourceTree 4.2.3(252)
            i have mac M1 13-inch , I tried the solution which a215657da841 gave, lastest cocopods & ruby, but didn't do any good,
            Do you guys have any solution for this
            , i have logged in with my account connect via HTTPS tried that , but failed 
            tried with SSH, but that also didn't do any good.

            sumit added a comment - Hi 2566180e0bc8 / 43c951f935c6 I am also facing the same issue downloaded the latest sourceTree 4.2.3(252) i have mac M1 13-inch , I tried the solution which a215657da841 gave, lastest cocopods & ruby, but didn't do any good, Do you guys have any solution for this , i have logged in with my account connect via HTTPS tried that , but failed  tried with SSH, but that also didn't do any good.

            a215657da841 

            Thanks for your info. We will try to analyse this issue in this direction.

            Raman Sidarakin (Inactive) added a comment - a215657da841   Thanks for your info. We will try to analyse this issue in this direction.

            Hi, @Raman Sidarakin.

            I bought new Macbook M1.
            Download Source Tree
            Try pull the project but I see error

            Unfortunately, but I already don't have this error and text. I will write down later
            Error was like this. I down't remember command. but something with `http`.
            bad CPU type in executable: 'git-https-status'
             

            But.
            I updated ruby because I had 2.6.1 from the box but for cocoapods need 2.7,
            installed cocoapods. 
            add ssh keys
            make git clone from terminal

            After your message, I tried clone with Source Tree and it works well.

            So, I think the problem only when we start use the Source Tree at new laptop where haven't launched Xcode or not updated ruby or something from these dependencies

            glushchenko added a comment - Hi, @Raman Sidarakin. I bought new Macbook M1. Download Source Tree Try pull the project but I see error Unfortunately, but I already don't have this error and text. I will write down later Error was like this. I down't remember command. but something with `http`. bad CPU type in executable: 'git-https-status'   But. I updated ruby because I had 2.6.1 from the box but for cocoapods need 2.7, installed cocoapods.  add ssh keys make git clone from terminal After your message, I tried clone with Source Tree and it works well. So, I think the problem only when we start use the Source Tree at new laptop where haven't launched Xcode or not updated ruby or something from these dependencies

            Hi, a215657da841 

            Thanks for contacting us.

            Since Sourcetree 4.2.2 Embedded git binaries are also supporting arm64. I have few questions to understand your issue:

            1. Could you please provide error output which you are receiving?
            2. Could you please tell me if the same issue occurred in Sourcetree 4.2.2?
            3. Could you please describe use case when this error occurs? Maybe you have some specific use-case or specific conditions when this issue occurs.

            For now I'm reopening this issue until we understand what's going on.

            Thanks.

            Raman Sidarakin (Inactive) added a comment - Hi, a215657da841   Thanks for contacting us. Since Sourcetree 4.2.2 Embedded git binaries are also supporting arm64. I have few questions to understand your issue: Could you please provide error output which you are receiving? Could you please tell me if the same issue occurred in Sourcetree 4.2.2? Could you please describe use case when this error occurs? Maybe you have some specific use-case or specific conditions when this issue occurs. For now I'm reopening this issue until we understand what's going on. Thanks.

              43c951f935c6 Raman Sidarakin (Inactive)
              f33816c3c23b ireinhart
              Affected customers:
              0 This affects my team
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: