I have a Git repository hosted on a personal, Debian-based, Apache web server. If I access it like:
git "command" user@server:/path/to/repo.git
I can clone, push, pull, etc. no problem.
Next, I added a virtual host and added a subdomain to my DNS record, so git.domain.com went to the directory in which I will be storing my repositories in.
I can successfully navigate to git.domain.com/repo.git and see the files and directories in the repository. But, when I try to clone it through HTTP with the domain: git clone git.domain.com/repo.git
it results in the error:
warning: You appear to have cloned an empty repository.
I am really thrown by this error, because I can clone it with SSH, and internally on the server (git clone /path/to/repo) and the web server should be serving the files exactly how they are internally.
After I cloned it and I received an empty repository, I went into the repository directory and ran git show-ref and the command went through (without failure), but I didn’t have any output.
How can I fix it?