You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fatal: ''<path>'' does not appear to be a git repository #1237
Actual output
$ git clone user@opensshserver:c:/ScriptRepo
Cloning into 'ScriptRepo'...
fatal: ''c:/ScriptRepo'' does not appear to be a git repository
fatal: Could not read from remote repository.
This issue has been discussed previously here, and the mentioned workaround works just fine once a remote is created. However this needs to be applied on each client machine, and it also prevents simple commands such as git clone - given that the setting of invoking powershell along with git-upload-pack can only be done once the remote has been created. Is there a plan to have this fixed, or is a way to specify the "default shell" that's "passed" along as being Powershell, thus solving the double single-quote issue ?
changed the title [-]fatal: ''<path'' does not appear to be a git repository[/-][+]fatal: ''<path>'' does not appear to be a git repository[/+]on Aug 23, 2018
Mihai Albert (@luckerby), as far as I remember, powershell can interpret the single quoted string. If you config powershell as default shell on the server side, I expect that you don't need to apply the workaround.
git clone remoteMachine:D:\test\mytest.git
Cloning into 'mytest'...
domain\user@localhost's password:
warning: You appear to have cloned an empty repository.
git clone remoteMachine:D:\test\mytest.git
Cloning into 'mytest'...
domain\user@localhost's password:
warning: You appear to have cloned an empty repository.
Yanbing (@bingbing8), sorry for the late reply. Your solution works perfectly - just tested. Extra bonus point - Jenkins can now connect to OpenSSH for git integration; I wouldn't have been able to apply the previous workaround in the Jenkins git dialog.
Will 保哥 (@doggy8088), i have a same problem after install PowerShell as a default shell, it is not work :(
I have trying different shells and /usr/bin/bash.exe from "git for Windows" packet works fine!
Hope it helps someone
I didn't try with PowerShell as suggested, I'm sure it works. However, I would like to keep using GitBash and be able to make the clone remote work. Any direction is appreciated.
Hello, I tried to change the defaultshell to powerShell but every time I did the service stoped working, then It did not work again until I change the registry back and rebooted.
Activity
[-]fatal: ''<path'' does not appear to be a git repository[/-][+]fatal: ''<path>'' does not appear to be a git repository[/+]bingbing8 commentedon Sep 21, 2018
Mihai Albert (@luckerby), as far as I remember, powershell can interpret the single quoted string. If you config powershell as default shell on the server side, I expect that you don't need to apply the workaround.
bingbing8 commentedon Sep 21, 2018
Mihai Albert (@luckerby), I tried to set the defaultShell, no need to apply the workaround:

doggy8088 commentedon Oct 12, 2018
Yanbing (@bingbing8) I tried your workaround. The server return:
I turned on debugging environment variables and git clone again:
I've got this:
Do you know what's going on?
bingbing8 commentedon Oct 17, 2018
Will 保哥 (@doggy8088), setting to powershell works for me.
luckerby commentedon Nov 2, 2018
Yanbing (@bingbing8), sorry for the late reply. Your solution works perfectly - just tested. Extra bonus point - Jenkins can now connect to OpenSSH for git integration; I wouldn't have been able to apply the previous workaround in the Jenkins git dialog.
shishelmishel commentedon Oct 4, 2019
Will 保哥 (@doggy8088), i have a same problem after install PowerShell as a default shell, it is not work :(
I have trying different shells and /usr/bin/bash.exe from "git for Windows" packet works fine!
Hope it helps someone
EdwinCloud101 commentedon Nov 24, 2019
I didn't try with PowerShell as suggested, I'm sure it works. However, I would like to keep using GitBash and be able to make the clone remote work. Any direction is appreciated.
vito0719 commentedon Feb 20, 2020
My problem is this:
fatal: '/F:/Path/To/Repo.git' does not appear to be a git repository
It seems to me the "/" before F is the problem...
Why are you able to use "git clone user@opensshserver:c:/ScriptRepo"? I have to put "/" in front of my drive to connect...
luisd1360 commentedon Feb 23, 2020
Hello, I tried to change the defaultshell to powerShell but every time I did the service stoped working, then It did not work again until I change the registry back and rebooted.
maertendMSFT commentedon Apr 28, 2020
We recommend using PowerShell, or if you need to use Bash, use the copy of SSH that comes with git