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



    • Bug
    • Resolution: Duplicate
    • High
    • None
    • None
    • None
    • None
    • Mac OS Sierra 10.12.2

      Mac Book Pro Mid 2015

      SourceTree 2.4(93)

    • Severity 1 - Critical



      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.


        Issue Links



              Unassigned Unassigned
              b51ec274eabc Xianghui Dong
              0 Vote for this issue
              2 Start watching this issue