Why do I need to run `ssh-add` in my Powershell profile? Why do I need to run `ssh-add` in my Powershell profile? powershell powershell

Why do I need to run `ssh-add` in my Powershell profile?


It's because your rsa key is not the default name ( id_rsa ) so you either need to use ssh-add (which adds it to a running service that remembers the key decrypted with your passphrase) or just add an entry into your ~\.shh\config

~\.ssh\config (create or edit):

Host github.com    HostName github.com    User git    IdentityFile ~/.ssh/github_rsa

Or, if github is the only thing you use ssh keys for, just rename the key to id_rsa and then git (well ssh.exe) will find it for you automatically AND poshgit will ssh-add it for you (to handle passphrases).