I am working on windows 10 and I am trying to connect git via ssh with selfhosted(corporate) instance of gitlab.
I try to follow guide here https://docs.gitlab.com/ee/ssh/. I am at the stage that ssh -Tv git@corpo.gitlab
correctly logs me into the instance, however when I try to do git fetch gitlab
ssh connection fails.
I have tried to compare debug output of standalone ssh
invocation and git
invoked ssh, and I have found out that in "git" variant, my private key is not even tried to be used. Logs says it looks in the correct user directory (so it is not an 'user scope' isse).
Why this can happen? I have added remote to the git repository via git remote gitlab git@corp.gitlab
.
setting proper ssh config
file with
Host ssh.corpo.gitlab
HostName ssh.corpo.gitlab
IdentityFile ~/.ssh/my_corpo_key
fixes the issue, but I think it should work without those additional settings. What could make the difference ?