sajad torkamani

If you keep getting asked to enter your SSH passphrase when doing SSH-related things like a git pull:

Enter passphrase for key '/Users/<account-name>/.ssh/id_ed25519': 

Run the below:

eval $(ssh-agent) && ssh-add

Ensure you have the below entry in your ~/.ssh/config file:

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_ed25519

Add your key to the macOS keychain:

 ssh-add --apple-use-keychain ~/.ssh/id_ed2551

Now, try opening a new terminal tab and running git pull again. You shouldn’t be asked to enter your passphrase again.

Tagged: macOS