How Do You Troubleshoot the Git Error Fatal Foobar.Git Does Not Appear to Be a Git Repository?

Problem scenario
You run a git command and you get an error like this:

"fatal: 'root/contint.git' does not appear to be a git repository
fatal: Could not read from remote repository."

The git command works on the server with the git repository.  But from another server you get the error above.  What should you do?

Find the full path to the git repo file.  Let's assume that you are using "git clone" and the full path is /var/opt/gitlab/git-data/repositories/root/.  From remote servers, you would run a command such as this:

git clone git@x.x.x.x:/var/opt/gitlab/git-data/repositories/root/contint.git

Leave a comment

Your email address will not be published. Required fields are marked *