GitBash is similar to Cygwin which uses traditional linux permissions.
I suggest you make sure your ssh directory exists in the correct place and has the right permissions by running from git bash the following commands:
mkdir ~/.ssh
chown $USER:$USER -R ~/.ssh
then run stat ~/.ssh
to see that the permissions changed correctly
ls ~/.ssh
to see that your key is properly installed in the correct place.
You can see which directory is actually registered as your home directory by running echo ~
or echo $HOME
.
You can change your linux HOME by modifying ~/.bashrc
and adding the line export HOME=/some/directory
You can see how your GitBash filesystem corresponds to your windows filesystem by typing the command mount
MINGW64 /c $ mount
C:/Program Files/Git on / type ntfs (binary,noacl,auto)
C:/Program Files/Git/usr/bin on /bin type ntfs (binary,noacl,auto)
C:/Users/MyUser/AppData/Local/Temp on /tmp type ntfs (binary,noacl,posix=0,usertemp)
C: on /c type ntfs (binary,noacl,posix=0,user,noumount,auto)
D: on /d type ntfs (binary,noacl,posix=0,user,noumount,auto)
If nothing else works, you can also try modifying the %HOME%
environment variable in windows to make sure it directs to the right path. But any windows env var will be overwritten by linux vars you add to your ~/.bashrc