petehallw petehallw - 5 days ago 5
Git Question

Git SSH key not being found

I'm trying to push my source up to our local Git repo. I've created an id_rsa key and added the key to GitLab, and a config file with the following contents:

Host git@git.repo.local
IdentityFile H:\.ssh\id_rsa


When I enter the following push command in Git Bash I receive a
Could not read from remote repository.
error:

$ git push git@git.repo.local:android/myApp.git


This was previously working fine when I was working from my C: drive but now I am working on a server drive (H:) it does not seem to like it.

Am I missing some set up here?

Answer

Try editing this in your config file:

Host git.repo.local
 IdentityFile H:\.ssh\id_rsa
Comments