I was getting the blow error when setting up a git repository under a Redmine project. I had two separate issues that I will explain below.
Redmine Error: The entry or revision was not found in the repository.
The first issue on this server was an incorrect version of git. I was aware that Redmine required git version 184.108.40.206 or above. So when I initially checked the server I saw git version 220.127.116.11 however I later noticed that git had been installed from source as well as installed via yum. The latest version available via yum was git version 18.104.22.168 and the user that was running Redmine happened to be usign the older version. Once this issue was resolved I still had the same error showing up under a Redmine Project’s Repository tab so there was another issue.
The second issue was the fact that Redmine was looking for git in /usr/bin and the source install of git had been installed in /usr/local/bin. So Redmine assumed git was not installed because it could not find it. This is an easy fix by adding a symbolic link to the correct version. Issue the command below to resolve the issue.
- ln -s /usr/local/bin/git /usr/bin/git
The above will create a symbolic link that will run /usr/local/bin/git any time /usr/bin/git is issued as a command. Once I resolved both of these errors I was able to see the git repository from the Redmine interface.