Tower Git client intermittently re-prompts for SSH key passphrase after macOS keychain changes
0 reputation · 06 Jun 2025, 21:42 UTC
0 reputation · 06 Jun 2025, 21:42 UTC
When using the Tower Git client (commercial Git GUI by fournova) on macOS, remote operations such as fetch, push, and clone intermittently trigger a fresh SSH key passphrase prompt, even though the passphrase was previously stored in the macOS keychain. The re-prompting appears to correlate with keychain sync events or macOS upgrades, but the trigger is not consistent.
Tower delegates SSH transport to the underlying Git and SSH configuration rather than managing credentials itself, so it is unclear whether the prompt originates from Tower, the system ssh-agent, or the keychain integration layer. There is no documented fournova guidance describing how Tower interacts with keychain passphrase caching across OS updates, and the behavior is difficult to reproduce on demand. Assume a recent Tower version on a current macOS release; exact version numbers should be confirmed before diagnosis.
Is the intermittent re-prompting a known Tower behavior tied to how it invokes SSH, or does it purely reflect ssh-agent/keychain state outside Tower's control? What diagnostic output (verbose SSH logging, keychain inspection) would reliably identify which layer drops the cached passphrase? Is there a supported configuration that keeps passphrase caching stable across macOS upgrades?
31775 reputation · 06 Jun 2025, 22:38 UTC
The re‑prompting you’re seeing is almost never a Tower‑specific bug. Tower simply runs the system git binary, which in turn calls ssh. The only place that can decide when a passphrase is needed is the macOS ssh‑agent and the login keychain. If the agent can’t read the key from the keychain (because it’s locked, restarted, or the key was removed), ssh falls back to asking you for the passphrase.
ssh‑agent starts before the login keychain is unlocked, so it can’t fetch the key.UseKeychain yes or AddKeysToAgent yes are missing for the key’s IdentityFile, the key is never stored in the agent.git binary; it has no internal key‑chain handling.ssh‑agent integrated with the login keychain when UseKeychain yes is set in ~/.ssh/config.ssh-add --apple-use-keychain ~/.ssh/id_ed25519 after each reboot or upgrade restores the key in the agent.Tower → Preferences → Git → Git Binary should point to /usr/bin/git (system) or /opt/homebrew/bin/git (Homebrew). If it points elsewhere, that binary may not honour the ~/.ssh/config.
ssh-add -l
If your key is missing, it’s not loaded.
[contact removed] with your host):
ssh -vvv -T [contact removed] 2>&1 | grep -E '(keychain|agent|identity|Offering)'
Look for lines like Offering public key: /Users/.../.ssh/id_ed25519 or sign_and_send_pubkey: no key in agent.
security find-generic-password -s 'SSH: /Users//.ssh/id_ed25519'
If the command fails, the passphrase is not stored.
ssh-add --apple-use-keychain ~/.ssh/id_ed25519
Then run ssh-add -l again to confirm.
~/.ssh/config, add a block for each key:
Host github.com
IdentityFile ~/.ssh/id_ed25519
UseKeychain yes
AddKeysToAgent yes
ssh-add --apple-use-keychain ~/.ssh/id_ed25519 to a login‑item or ~/.bash_profile so it runs automatically after each login.
GIT_SSH_COMMAND='ssh -vvv' under Preferences → Git → Environment Variables to get verbose logs if the problem re‑appears.
To fine‑tune the recommendation, could you confirm which SSH key(s) you’re using and whether UseKeychain yes is set for each in ~/.ssh/config? That detail determines whether the key is ever offered by ssh‑agent in the first place.
Use comments to ask for clarification. Post a solution as an answer.
No question comments on this page.