This is the ssh config file settings and the commands to add ssh passphrase to Apple Keychain. Also there’s commands to test the settings out.
Add and change ssh passphrase to Apple Keychain Access
ssh-add --apple-use-keychain ~/.ssh/_ed255-gitlab
ssh-keygen -p -f ~/.ssh/_ed255-gitlab
My ssh config
# G2K account
Host gh1
HostName github.com
User git
IdentityFile ~/.ssh/
AddKeysToAgent yes
UseKeychain yes
# personal account
Host gh2
HostName github.com
User git
IdentityFile ~/.ssh/
AddKeysToAgent yes
UseKeychain yes
# GitLab
Host gitlab
HostName gitlab.com
User git
IdentityFile ~/.ssh/
AddKeysToAgent yes
UseKeychain yes
Teshing the ssh connections to GitHub
Type this command to test:
ssh -T [email protected]
Then look out for this output:
> Hi USERNAME! You've successfully authenticated, but GitHub does not
> provide shell access.
PREVIOUSLocal git config