petehallw petehallw - 4 months ago 31
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.

$ 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?


Try editing this in your config file:

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