I installed Git for Windows and Powershell 7.1. When I try to clone a repository from git bash using ssh key, it works perfectly. However when I try to do similar from Powershell 7.1, I get a fatal: Could not read from remote repository error.
Steps Followed
1. PS> Start-Service ssh-agent
2. PS> ssh-add D:\Keys\.ssh\my_private_key (I get identity added message)
3. PS> git clone git@github.com:my-username/my-repo.git
Error Message
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights