I\'ve a repository moodle on my Github account which I forked from the official repository.
I then cloned it on my local machine. It worked
I had the same error on git pull origin branchname when setting the remote origin as path fs and not ssh in .git/config:
fatal: '/path/to/repo.git' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
It was like so (this only works for users on same server of git that have access to git):
url = file:///path/to/repo.git/
Fixed it like so (this works on all users that have access to git user (ssh authorizes_keys or password)):
url = git@domain.com:path/to/repo.git
the reason I had it as a directory path was because the git files are on the same server.