Uploaded image for project: 'Sourcetree For Mac'
  1. Sourcetree For Mac
  2. SRCTREE-4499

identity isn't loaded into SSH Agent after reboot or logout for mac os Sierra

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: High
    • Resolution: Duplicate
    • Affects Version/s: None
    • Fix Version/s: None
    • Component/s: None
    • Labels:
      None
    • Environment:

      Mac OS Sierra 10.12.2

      Mac Book Pro Mid 2015

      SourceTree 2.4(93)

    • Last commented by user?:
      true
    • Symptom Severity:
      Critical

      Description

      Bug:

      With Bitbucket and github account setup correctly and everything works, if mac os reboot sourcetree will fail to connect. Error "public key denied".

      Through SourceTree itself there is no way to fix this error unless user delete the public key and generate new one, add new key again.

      Diret Cause:

      The identity is not loaded into ssh agent.

      ssh-add -l return empty. Once the keys were added, everything works.

      Root Cause:

      macOS/OS X till Yosemite used to remember SSH keys added by command ssh-add -K <key>.

      Unfortunately this way no longer works and command ssh-add -K in macOS Sierra no longer saves SSH keys in OS's keychain. As Apple Developer stated: "That’s expected. We re-aligned our behavior with the mainstream OpenSSH in this area."

      this and this

      SoureTree created config file in .ssh folder and added some entries. However this didn't work.

      It's also possible there are something in security setting of my mac which prevent it work. I tried ssh-add -K which seemed add them to keychain, but ssh-add -A reported that "No identity found in the keychain."

      Right now my bandit remedy is to run a script to add the identities manually after every reboot or logout.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                xhdong1684524920 Xianghui Dong
                Participants:
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Last commented:
                  2 years, 30 weeks, 4 days ago