Reputation: 11
I am facing an issue when doing on Linux Ubuntu
git init
git remote add origin username@domain@server_IP:e:/myRepo
git fetch origin
After entering my password, I have this message:
fatal: ''e:/myRepo'' 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.
I searched and found people with the "same issue", but the reason I am posting this question is that I went through the proposed solutions and none of them worked for me.
Here is my situation:
-bare repository on windows server 2016 running OpenSSH. (e:\myRepo with full rights for everyone)
-was able to do the operation from Windows10 PCs by using powershell to run additional git commands
git init
git remote add origin username@domain@server_IP:e:/myRepo
git config --local remote.origin.uploadpack "powershell git-upload-pack"
git config --local remote.origin.receivepack "powershell git-receive-pack"
git fetch origin
Thanks.
Upvotes: 1
Views: 244
Reputation: 136
Your workaround settings
git config --local remote.origin.uploadpack "powershell git-upload-pack"
git config --local remote.origin.receivepack "powershell git-receive-pack"
are in the Git For Windows wiki
You have to apply those workaround fixes on all your git clients (Windows
, *nix
), so long as the Git Server is Windows
.
Those double-quotes in error message's path (E.g. ''C:\some\path''
) are related to the Git Server's default shell (i.e. Command Prompt, since it's OS is Windows) not parsing paths correctly, before passing them to git-upload-pack
and git-receive-pack
.
You get similar error messagesfor git clone
(as in the stated link), git push
, git remote -v
, and in your case, git fetch
.
$ git remote -v
origin git@windowshost:C:/some.git/
$ git push origin
fatal: ''C:/some.git/'' does not appear to be a git repository
Upvotes: 1