fork-dev / Tracker

Bug and issue tracker for Fork for Mac
494 stars 12 forks source link

Mac to Mac ssh remote does not add password to keychain #2017

Open ndarlington opened 7 months ago

ndarlington commented 7 months ago

Steps

  1. Create shell user and bare remote repository on mac2
  2. Add remote to mac2 for repository on mac1 using ssh access (e.g. git@mac2:bare-repo)
  3. Push branch from mac1 to mac2 and get prompted for password in Fork dialog
  4. Enter password and click checkbox for adding to keychain
  5. Observe successful push take place
  6. Try to fetch, pull, or push another branch
  7. Prompted for password again
  8. Restart Fork
  9. Try to fetch, pull, or push another branch
  10. Prompted for password again

Expected: Password to have been remembered and reused without prompting again for every interaction

I believe I've done everything I should, however for full clarification if I use git at the command prompt with these repositories I am prompted for the ssh password each time too.

Mac2 isn't running any git server hosting service like gitea or bitbucket server.

DanPristupov commented 7 months ago

Did you try to change url to ssh://mac2@bare-repo?

ndarlington commented 7 months ago

I have just tried this, but it makes no difference to requiring re-authentication on every interaction.

Furthermore it's less desirable as I now have to include the user twice and give up the full path from the root to the location of the repository (e.g. ssh://git@mac2/Users/git/bare-repo ).

image

I chose when fetching from this edited remote to save the password to the keychain: image

It works in that instance. I then fetch again, and I'm straight back to this dialog again: image

ndarlington commented 7 months ago

In case it helps or matters, the client mac is the following: Macbook Air M2 MacOS Sonoma 14.1

ndarlington commented 7 months ago

I also notice that inside Keychain Access there are 2 password entries for my accounts registered within Fork (for other systems - one for github, one for bitbucket server), both using https protocol. So they have the name pattern like this: fork:https://{hostname}[{/path}].{username}.accesstoken

Is there an expected pattern for entering similarly for ssh password access that I could add to Keychain Access manually for Fork to use for my bare repo remote? What would that look like if I wanted to try?

I couldn't identify any entries in Keychain Access for the ssh type, or perhaps this will only be used for the recognized account types and doesn't apply?

DanPristupov commented 7 months ago

Let's start with the log. Can you restart Fork, reproduce the problem 2 times and send me the log file ~/Library/Logs/Fork.log to support@fork.dev, please? Any private info can be redacted.

devi3g commented 3 months ago

This issue has been in Fork for a while now, and did exist in exactly the same way in previous versions of OSX

Aya-X commented 22 hours ago

Same problem here: Macbook Air M3 MacOS Sonoma 14.5