• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Low Low
    • None
    • 4.0
    • General
    • Severity 1 - Critical

      In Version 4.0.1, multiple SourceTreeLogin seems to get spawn as soon as the app is launched. Each process in turn asks `securityd` to do something. As a result, my `securityd` has a minimum CPU usage of ~20%, sometimes spiking up to 100% without ever going back down.

      I'm not sure exactly what Sourcetree is trying do? Ideas?

            [SRCTREE-7272] SourceTreeLogin causes high CPU usage

            Fixed in Sourcetree 4.2.1

            Raman Sidarakin (Inactive) added a comment - Fixed in Sourcetree 4.2.1

            Allen P added a comment - - edited

            Found this thread when my energy consumption said SourceTree was using significant energy.

            ps -A | grep SourceTree confirmed the issue in this thread:

            78926 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:
            78927 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:
            78928 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:
            78929 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:
            78930 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:
            78931 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint:

            each process would die and linger for a bit as (SourceTreeLogin) and then restart the cycle.

            Indeed, new machine, missing key on BitBucket.

            Upon adding it, I changed the account authentication from HTTPS to SSH, and did sudo pkill SourceTreeLogin and things got under control.

            Allen P added a comment - - edited Found this thread when my energy consumption said SourceTree was using significant energy. ps -A | grep SourceTree confirmed the issue in this thread: 78926 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: 78927 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: 78928 ??         0:00.02 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: 78929 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: 78930 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: 78931 ??         0:00.01 /Applications/Sourcetree.app/Contents/Resources/SourceTreeLogin Please type 'yes', 'no' or the fingerprint: each process would die and linger for a bit as (SourceTreeLogin) and then restart the cycle. Indeed, new machine, missing key on BitBucket. Upon adding it, I changed the account authentication from HTTPS to SSH, and did sudo pkill SourceTreeLogin and things got under control.

            tache added a comment - - edited

            I was having this issue as well for AWS CodeCommit

            In my case, I had to do the following command in the terminal. 

            ssh -T Your-SSH-Key-ID@git-codecommit.us-east-1.amazonaws.com

            tache added a comment - - edited I was having this issue as well for AWS CodeCommit In my case, I had to do the following command in the terminal.  ssh -T Your-SSH-Key-ID@git-codecommit.us-east-1.amazonaws.com

            My whole team stopped using SourceTree over a year ago due to this issue (so I cannot test) but I'm very happy to see someone finally working on it!

            Cameron Childress added a comment - My whole team stopped using SourceTree over a year ago due to this issue (so I cannot test) but I'm very happy to see someone finally working on it!

            Hi, 9016afa05625 .

            The command is correct. According to error message, It looks like there are some issues with your ssh key configuration, e.t.c. Could you please check if your public key from ~/.ssh folder is added to bitbucket. Here is article for reference how to configure ssh keys for bitbucket: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/

            Please, follow "Set up SSH on macOS/Linux" paragraph and check your ssh key configuration.

            Thanks.

            Raman Sidarakin (Inactive) added a comment - Hi, 9016afa05625  . The command is correct. According to error message, It looks like there are some issues with your ssh key configuration, e.t.c. Could you please check if your public key from ~/.ssh folder is added to bitbucket. Here is article for reference how to configure ssh keys for bitbucket: https://support.atlassian.com/bitbucket-cloud/docs/set-up-an-ssh-key/ Please, follow "Set up SSH on macOS/Linux" paragraph and check your ssh key configuration. Thanks.

            webfxmasta added a comment - - edited

            Raman,

            Is there a different workaround for Bitbucket?

            ssh -T git@bitbucket.org returns with:

            git@bitbucket.org: Permission denied (publickey).

            webfxmasta added a comment - - edited Raman, Is there a different workaround for Bitbucket? ssh -T git@bitbucket.org  returns with: git@bitbucket.org: Permission denied (publickey).

            Hello everyone. 

            We are currently looking into this issue. Following it’s description and comments, I assume that issue is related to missing host and key in ~/.ssh/.known_hosts file. At least I was able to reproduce it only in these conditions. Sourcetree has a logic to handle such situations, but it looks like this logic is broken.

            While we are working on resolving this issue I could suggest you workaround, which could help to resolve this issue on your machine:

            1. Open Terminal.app
            2. Execute this command: 
              ssh -T git@github.com
              (in case your repo is not on GitHub, then specify your host)
            3. You will see this message:
              The authenticity of host 'github.com (140.82.121.4)' can't be established.
              ED25519 key fingerprint is SHA256:+……….
              This key is not known by any other names
              Are you sure you want to continue connecting (yes/no/[fingerprint])? 
            4. Type “yes” and press enter.
            5. You will see this message:
              Warning: Permanently added 'github.com' (…..) to the list of known hosts.
              You've successfully authenticated, but GitHub does not provide shell access.
            6. Now, host and key is added into your ~/.ssh/.known_hosts file.
            7. But, you still have a lot of hanged SourceTreeLogin and ssh processes. To fix it, you could just restart your machine or perform this command in terminal:
              killall ssh
              This step is required to drop hanged ssh processes, which are in infinite loop because of this issue.
            8. Sourcetree should work correctly now and CPU usage should be normal as expected.

            Please, let me know, if this workaround is working for you.

            Thanks.

            Raman Sidarakin (Inactive) added a comment - - edited Hello everyone.  We are currently looking into this issue. Following it’s description and comments, I assume that issue is related to missing host and key in ~/.ssh/.known_hosts file. At least I was able to reproduce it only in these conditions. Sourcetree has a logic to handle such situations, but it looks like this logic is broken. While we are working on resolving this issue I could suggest you workaround, which could help to resolve this issue on your machine: Open Terminal.app Execute this command:  ssh -T git@github.com (in case your repo is not on GitHub, then specify your host) You will see this message: The authenticity of host 'github.com (140.82.121.4)' can't be established. ED25519 key fingerprint is SHA256:+………. This key is not known by any other names Are you sure you want to continue connecting (yes/no/ [fingerprint] )?  Type “yes” and press enter. You will see this message: Warning: Permanently added 'github.com' (…..) to the list of known hosts. You've successfully authenticated, but GitHub does not provide shell access. Now, host and key is added into your ~/.ssh/.known_hosts file. But, you still have a lot of hanged SourceTreeLogin  and ssh processes. To fix it, you could just restart your machine or perform this command in terminal: killall ssh This step is required to drop hanged ssh processes, which are in infinite loop because of this issue. Sourcetree should work correctly now and CPU usage should be normal as expected. Please, let me know, if this workaround is working for you. Thanks.

            Same here. Super annoying. please fix

            hzlzh hzlzh added a comment - Same here. Super annoying. please fix

            Marcus Fritze added a comment - - edited

            As described here https://apple.stackexchange.com/a/389836/453409

            I fixed it by removing any git credentials / SourceTree Logins in OS X Keychain Access.

             

            see also: https://jira.atlassian.com/browse/SRCTREE-7840

            Marcus Fritze added a comment - - edited As described here https://apple.stackexchange.com/a/389836/453409 I fixed it by removing any git credentials / SourceTree Logins in OS X Keychain Access.   see also: https://jira.atlassian.com/browse/SRCTREE-7840

            webfxmasta added a comment -

            This is still affecting 4.1.x as well.  Even when killing the processes, more spawn endlessly

            webfxmasta added a comment - This is still affecting 4.1.x as well.  Even when killing the processes, more spawn endlessly

              Unassigned Unassigned
              1deb4b0fba04 gsong
              Affected customers:
              40 This affects my team
              Watchers:
              52 Start watching this issue

                Created:
                Updated:
                Resolved: