Last active
July 19, 2024 08:13
-
-
Save GrennKren/a724e2ff9d71a113d626bed0719c4cdb to your computer and use it in GitHub Desktop.
Handling git problem on Windows Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Client Side: | |
If you get the error message: | |
fatal: ''/D:/project/myrepo'' does not appear to be a git repository | |
when trying to clone a git repository via SSH using OpenSSH on a Windows Server, for example: | |
`$ git clone ssh://server_username@xx.xx.xx.xx:22110/D:/project/myrepo` | |
##################################################################### | |
Server side: | |
Make sure D:/project/myrepo has been initialized with `git init`, and change the default shell of OpenSSH from powershell to bash.exe, which comes with git-bash. | |
Open regedit | |
Go to `HKEY_LOCAL_MACHINE\SOFTWARE\OpenSSH` and add a new String Value C:\Program Files\Git\usr\bin\bash.exe without double quotes ' " ' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment