Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Git SSH client for windows and wrong path for .ssh/config file

Tags:

git

windows

ssh

I installed Git-1.7.9-preview20120201.exe, and when I try to access my repository via SSH it failed.

I investigated and found that if I run SSH -T [email protected], SSH doesn't load ~/.ssh/config where a custom port is defined.

When I try SSH -F c:\users\tomas\.ssh\config [email protected] everything is OK.

I used Process Monitor and found that SSH is trying to find \\\\.ssh\config here C:\Windows\CSC\v2.0.6\namespace\.ssh.

Why?

How I can force it to use normal path? %HOMEPATH%\.ssh\config?

like image 574
ATom Avatar asked Mar 01 '12 09:03

ATom


People also ask

Where is Git SSH config on Windows?

SSH to GitHub on Windows Simply copy the SSH URL from the GitHub page of the repository you wish to clone, and then provide that SSH link to the Git clone command: PS C:\github\ssh\example> git clone [email protected]:cameronmcnz/java-jakarta-ee.

Where is SSH config file in Windows 10?

Configuring the default shell for OpenSSH in Windows To set the default command shell, first confirm that the OpenSSH installation folder is on the system path. For Windows, the default installation folder is %systemdrive%\Windows\System32\openssh.

What is the default location for storing SSH configuration files?

The ssh program on a host receives its configuration from either the command line or from configuration files ~/. ssh/config and /etc/ssh/ssh_config .


2 Answers

set the HOME environment variable pointing to %USERPROFILE% for ssh to pick it up. This usually seems to be the problem for many unix solutions that run on windows.

Fast access to set user env variables:

Start > Type "env" > Select "Environmental variables for your account"

like image 183
vsrikarunyan Avatar answered Sep 27 '22 21:09

vsrikarunyan


I found that windows msygit port store ssh config here <installPath>\Git\etc\ssh\ssh_config

like image 25
ATom Avatar answered Sep 27 '22 21:09

ATom