• Icon: Bug Bug
    • Resolution: Fixed
    • Icon: High High
    • None
    • 4.1.8
    • Bitbucket, Git, GitHub
    • None
    • Major

      Cloning via SSH (Bitbucket, Github) and HTTPS (Github) is extremely buggy (especially M1 Mac, a bit better on Windows 10/11), especially when multiple accounts connected. It just never works without tricks with other git clients and is very long and nerve-wrecking to fix.

      1) Bitbucket SSH is not cloning on Mac M1 at all. Bitbucket untrusted IP address seems to be one of the issues, Sourcetree is unable to figure that out (unable to ask to continue with untrusted IP (no idea why your IP are untrusted)) and endlessly displays loading circle.

      2) SSH via Github and HTTPS is not cloning due to Sourcetree OAuth app asking single permission to read profile email from Github, workaround is to use a trick to re-authenticate with more OAuth app permissions.

      Had issues a year ago, still on the latest update they are present.

            [SRCTREE-7959] Git Clone does not work

            Fixed in Sourcetree 4.2.1

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

            Ok, it looks like some ssh key config issue. Could you please try to create this file ~/.ssh/config and put the following content inside it:

            Host *
              UseKeychain yes
              AddKeysToAgent yes
              IdentityFile ~/.ssh/PATH_TO_IDENTITY

            In case config file is already exists, then backup it at first. I hope it should help to resolve your issue. 

            Also, as alternative, you could add this: ssh-add --apple-use-keychain ~/.ssh/xxx into ~/.zprofile file. It's kind of overkill, because previous suggestion with config file should help you.

            Raman Sidarakin (Inactive) added a comment - - edited Ok, it looks like some ssh key config issue. Could you please try to create this file ~/.ssh/config and put the following content inside it: Host *   UseKeychain yes   AddKeysToAgent yes   IdentityFile ~/.ssh/PATH_TO_IDENTITY In case config file is already exists, then backup it at first. I hope it should help to resolve your issue.  Also, as alternative, you could add this:  ssh-add --apple-use-keychain ~/.ssh/xxx  into ~ /.zprofile  file. It's kind of overkill, because previous suggestion with config file should help you.

            warmrain added a comment - - edited

            CONSOLE> % git clone git@github.com:xxx/xxx.git

            Cloning into 'xxx'...

            no such identity: /Users/xxx/.ssh/xxx: No such file or directory

            git@github.com: Permission denied (publickey).

            fatal: Could not read from remote repository.

             

            Please make sure you have the correct access rights

            and the repository exists.

             

            CONSOLE> ssh-add --apple-use-keychain ~/.ssh/xxx

            Identity added: /Users/xxx/.ssh/xxx (Generated by Sourcetree on macOS for xxx)

             

            CONSOLE> % git clone git@github.com:xxx/xxx.git

            everything works

            warmrain added a comment - - edited CONSOLE> % git clone git@github.com:xxx/xxx.git Cloning into 'xxx'... no such identity: /Users/xxx/.ssh/xxx: No such file or directory git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.   Please make sure you have the correct access rights and the repository exists.   CONSOLE> ssh-add --apple-use-keychain ~/.ssh/xxx Identity added: /Users/xxx/.ssh/xxx (Generated by Sourcetree on macOS for xxx)   CONSOLE> % git clone git@github.com:xxx/xxx.git everything works

            Hi, 82dbdda59018

            Your output from Sourcetree looks pretty strange. Could you please check if this setup (your ssh key) is working from the Terminal? I mean does it work when you are trying to clone the repo from the terminal using "git clone" command?

            Raman Sidarakin (Inactive) added a comment - Hi,  82dbdda59018 Your output from Sourcetree looks pretty strange. Could you please check if this setup (your ssh key) is working from the Terminal? I mean does it work when you are trying to clone the repo from the terminal using "git clone" command?

            warmrain added a comment - - edited

            Raman

            thanks,

            I'm unable to open that ticket though, it seems to be private.

            After my m1 mac turned off / back on, SSH problem strikes again:

             

            git -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin 

            no such identity: /Users/me/.ssh/Me-GitHub: No such file or directory

            git@github.com: Permission denied (publickey).

            fatal: Could not read from remote repository.

             

            Please make sure you have the correct access rights

            and the repository exists.

            warmrain added a comment - - edited Raman thanks, I'm unable to open that ticket though, it seems to be private. After my m1 mac turned off / back on, SSH problem strikes again:   git -c color.branch=false -c color.diff=false -c color.status=false -c diff.mnemonicprefix=false -c core.quotepath=false -c credential.helper=sourcetree fetch origin  no such identity: /Users/ me /.ssh/ Me -GitHub: No such file or directory git@github.com: Permission denied (publickey). fatal: Could not read from remote repository.   Please make sure you have the correct access rights and the repository exists.

            82dbdda59018 

            Thanks for your response. According to your description it loos like your issue is related to this one https://jira.atlassian.com/browse/SRCTREE-7957

            We are also created internal issue for analysing and fixing it. We will try to provide a fix in future releases.

            Raman Sidarakin (Inactive) added a comment - 82dbdda59018   Thanks for your response. According to your description it loos like your issue is related to this one https://jira.atlassian.com/browse/SRCTREE-7957 We are also created internal issue for analysing and fixing it. We will try to provide a fix in future releases.

            warmrain added a comment - - edited

            Hi Raman,

            these problems happen all the time for me, I was able to fix them so I'm a bit afraid to break everything again by changing 

            But from my experience I'm sure I'll have them next time I change something (in case they will not be fixed), so I'll try to comment here. When I'll have more time, I'll revoke my app permission and will make screenshots.

             

            From time to time (last time happened few hours ago) GitHub access breaks on M1 Mac as SSH key, while visible in Sourcetree UI, isn't actually working.

            As a result I was unable to Fetch my repository with a message something like "<SSH path> no such file or directory", though SSH key was created by Sourcetree and file and folder still exist.

            Maybe, permission issues, though I gave permissions to access my keychain with Sourcetree when alert message box asked for permission. I've fixed it with terminal ssh-add --apple-use-keychain ~/.ssh/MYACC-GitHub

            And I have to re-run that command in terminal each few weeks.

             

             

            Concerning OAuth permissions, when I connect new OAuth Github Account via Sourcetree button

            it looks something like this:

            (not Sourcetree screenshot, but it was similar)

             

            I'd fixed that with workaround: https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-for-Mac-GitHub-account-permissions/qaq-p/961120

             

            And my repository became able to be Cloned/Fetched/Pulled.

             

            Edit: Images do not work

            warmrain added a comment - - edited Hi Raman, these problems happen all the time for me, I was able to fix them so I'm a bit afraid to break everything again by changing  But from my experience I'm sure I'll have them next time I change something (in case they will not be fixed), so I'll try to comment here. When I'll have more time, I'll revoke my app permission and will make screenshots.   From time to time (last time happened few hours ago) GitHub access breaks on M1 Mac as SSH key, while visible in Sourcetree UI, isn't actually working. As a result I was unable to Fetch my repository with a message something like " <SSH path> no such file or directory ", though SSH key was created by Sourcetree and file and folder still exist. Maybe, permission issues, though I gave permissions to access my keychain with Sourcetree when alert message box asked for permission.  I've fixed it with terminal  ssh-add --apple-use-keychain ~/.ssh/MYACC -GitHub And I have to re-run that command in terminal each few weeks.     Concerning OAuth permissions, when I connect new OAuth Github Account via Sourcetree button it looks something like this: (not Sourcetree screenshot, but it was similar)   I'd fixed that with workaround: https://community.atlassian.com/t5/Sourcetree-questions/Sourcetree-for-Mac-GitHub-account-permissions/qaq-p/961120   And my repository became able to be Cloned/Fetched/Pulled.   Edit: Images do not work

            Hi, 82dbdda59018 

            Thanks for contacting us and describing your issues.

            1. Regarding the first issue - we are working on it right now and hope the fix will be available on the next release. Root cause of this issue is related to this ticket https://jira.atlassian.com/browse/SRCTREE-7272
            2. Regarding the second issue. Could you please tell us more about how to reproduce it? This way we will be able to analyse it and fix.

            Thank you and looking forward for your reply regarding issue with oAuth.

            Raman Sidarakin (Inactive) added a comment - Hi, 82dbdda59018   Thanks for contacting us and describing your issues. Regarding the first issue - we are working on it right now and hope the fix will be available on the next release. Root cause of this issue is related to this ticket https://jira.atlassian.com/browse/SRCTREE-7272 Regarding the second issue. Could you please tell us more about how to reproduce it? This way we will be able to analyse it and fix. Thank you and looking forward for your reply regarding issue with oAuth.

              Unassigned Unassigned
              82dbdda59018 warmrain
              Affected customers:
              0 This affects my team
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: