When Powershell is started Pageant pops up an error saying "Couldn't load this key (unable to open file)":

What key is it talking about? Do I need to set it somewhere?
That's the error pageant gives when it tries to open a non-existent file. By default, posh-git will try to load pageant with any .ppk files in $Env:Home.ssh, but having no keys there just means it won't be given any as arguments. Are you calling Add-SshKey anywhere in your profile?
I have only this in my Microsoft.Powershell.Profile.ps1:
try { $null = gcm pshazz -ea stop; pshazz init 'default' } catch { }
# Load posh-git example profile
. 'C:\Users\user\Documents\WindowsPowerShell\Modules\posh-git\profile.example.ps1'
Could this be because the SSH keys in .ssh are password protected?
That happened when reinstall my system. After I deployed the tortoisGit, it showed me the tips when I used 'Git pull' or other code.
Then I searched this issue, but it did not resole my problem. Fortunately, I recognised that whether it was the problem of the old configuration? So, I opened the 'config' file of my project, deleted the 'puttykeyfile' line.
...!
Resolved!
Hoping to help you!
ps: project dictionary -> .git -> config -> puttykeyfile
I'm also having this issue, but the keys I want to load are definitely there. I have one key in $env:HOME\.ssh that loads just fine: [email protected], but I put another one there that fails: sb.ppk. When sb.ppk is present, I experience the issue, but when it is absent, I do not. Also, sb.ppk loads just fine when I add it manually using pagent in the Windows system tray.
Most helpful comment
That happened when reinstall my system. After I deployed the tortoisGit, it showed me the tips when I used 'Git pull' or other code.
Then I searched this issue, but it did not resole my problem. Fortunately, I recognised that whether it was the problem of the old configuration? So, I opened the 'config' file of my project, deleted the 'puttykeyfile' line.
...!
Resolved!
Hoping to help you!
ps: project dictionary -> .git -> config -> puttykeyfile