Authentication via SSH
If you are using SSH for authentication, Gitfox works like git from the commandline without extra configuration. Please note that service accounts are only used for HTTPS authentication, not SSH.
1. Storing Passphrases in Gitfox
Gitfox can store your passphrase for you. If your private key has a passphrase set, Gitfox will ask you to enter the password.
The password will be stored in your keychain with the following name:
Gitfox Key /Users/<username>/.ssh/id_<hash>
However, we currently cannot detect if the passphrase you entered is valid. If you entered the wrong passphrase, you will get connection errors. In that case, please delete the stored key from your keychain and try again.
2. Configuring ssh-agent
You can also tell your ssh-agent to store the password in your keychain for you,
without requiring password entry on connection. To do that, please add the following
lines to your ~/.ssh/config
file
Host *
UseKeychain yes
AddKeysToAgent yes
This will configure all hosts to store your passphrases in your keychain. If you just want to store it for a single host, consider something like this
Host example.com
IdentityFile path/to/private_key
UseKeychain yes
AddKeysToAgent yes
For the ssh-agent to remember your passphrase, add your private key to the ssh-agent once and enter the passphrase for it.
On macOS 12.0 or newer use:
ssh-add --apple-use-keychain path/to/private_key
On macOS versions below 12.0 use:
ssh-add -K path/to/private_key
3. Using Multiple SSH Keys
If you have a setup that requires multiple SSH keys,
you'll have to update your ~/.ssh/config
accordingly.
In this example we configure 2 seprate SSH keys for a private and work account:
Host private.github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_private
Host work.github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_work
For Gitfox to pick up the correct SSH key, you need to change your remote url to the appropriate host, like this:
- Work:
[email protected]:user/repo.git
- Private:
[email protected]:user/repo.git