I set up OpenSSH on the remote using Win32-OpenSSH,
so SSH logs into Powershell. However Powershell doesn't handle paths
wrapped in single quotes like *nix shells do, instead treating single
quotes in paths literally. I found out that the remote commands (git pull/fetch/ls-remote/etc.) wrap the paths they send to the remote in single quotes, as evidenced by trying to ls-remote:
Note the first fatal shows ''/path_to/repo'':
I am sure that this is the case because if I make a directory literally called 'path_to, and a repo directory repo' within it, including the quotes, it works. Is there any git client option to disable these single quote
wrappings, or a Powershell option to read paths wrapped with single
quotes, or maybe even a later version of git-upload-pack that strips these quotes out?
I set up OpenSSH on the remote using Win32-OpenSSH, so SSH logs into Powershell. However Powershell doesn't handle paths wrapped in single quotes like *nix shells do, instead treating single quotes in paths literally. I found out that the remote commands (git pull/fetch/ls-remote/etc.) wrap the paths they send to the remote in single quotes, as evidenced by trying to ls-remote:
$ GIT_TRACE=1 git ls-remote user@addr:path/to/repo
17:22:31.451511 exec-cmd.c:237 trace: resolved executable dir: C:/Users/me/Git/mingw64/bin
17:22:31.457170 git.c:440 trace: built-in: git ls-remote user@addr:/path_to/repo/
17:22:31.457170 run-command.c:663 trace: run_command: unset GIT_PREFIX; ssh user@addr 'git-upload-pack '\''/path_to/repo/'\'''
fatal: ''/path_to/repo/'' does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Note the first fatal shows ''/path/to/repo'':