Git+Redmine: The entry or revision was not found in the repository

Added by Cedric RTD over 5 years ago

Hi guys !

I'm trying to access a git repository with Redmine. Unfortunately, I'm not able to do this, here is the error given :

The entry or revision was not found in the repository.

Here is my configuration:
SCM: Git
Main Repository: Checked
Identifier: wide
Path to repository: /var/repos/git/wide
Path encoding: UTF-8

I tried several things. After cloning my non-bare repository into a bare repository, I tried these several paths:
/var/repos/git/wide
/var/repos/git/wide/.git
/var/repos/git/wide.git
/var/repos/git/wide.git/.git

I also tried to change the owner of my git repository to apache (as apache runs Redmine).

Any help would be appreciated.
Regards.

Replies (5)

RE: Git+Redmine: The entry or revision was not found in the repository - Added by Martin Denizet (redmine.org team member) over 5 years ago

Hello Cedric,

You have to make a first commit to prevent this error.
You can make that commit after initializing your bare repo.

Cheers,

-Martin

RE: Git+Redmine: The entry or revision was not found in the repository - Added by Cedric RTD over 5 years ago

Hi Martin,

Thanks for your reply.
Actually, my Git repository already had commits.

Do you mean I need to do a dummy commit after cloning my initial repository into a bare one ?

BR,
Cedric

Edit:
I forgot to add that i'm under a CentOS 7, and thus, so I installed redmine myself, not by using any package.
When I try to access the git repository by using Redmine web interface, apache gives the following :

App 15772 stderr: fatal: Not a git repository: '/var/repos/git/wide'

But when I go inside this repository, it is a git repository..

RE: Git+Redmine: The entry or revision was not found in the repository - Added by Cedric RTD over 5 years ago

Hi,

It looks like redmine is trying to do a git --git-dir=/var/repos/git/wide' log.
Actually, the result of this command is OK.

the owner of the /var/repos/git repository is apache.
And I set PassengerUser apache.

Still got the problem.

Is there any log I can check in order to get more information ?
I already checked the production.log and below is what i get:

Started GET "/projects/wide/settings/repositories" for 10.212.117.130 at 2015-07-15 08:28:27 +0200
Processing by ProjectsController#settings as HTML
  Parameters: {"id"=>"wide", "tab"=>"repositories"}
  Current user: a04 (id=3)
  Rendered projects/_form.html.erb (6.4ms)
  Rendered projects/_edit.html.erb (7.1ms)
  Rendered projects/settings/_modules.html.erb (2.7ms)
  Rendered projects/settings/_members.html.erb (3.0ms)
  Rendered projects/settings/_versions.html.erb (2.1ms)
  Rendered projects/settings/_issue_categories.html.erb (1.0ms)
  Rendered projects/settings/_wiki.html.erb (0.8ms)
  Rendered projects/settings/_repositories.html.erb (3.1ms)
  Rendered projects/settings/_boards.html.erb (1.0ms)
  Rendered projects/settings/_activities.html.erb (5.1ms)
  Rendered common/_tabs.html.erb (28.5ms)
  Rendered projects/settings.html.erb within layouts/base (28.8ms)
Completed 200 OK in 45ms (Views: 35.4ms | ActiveRecord: 4.3ms)
Started GET "/projects/wide/repository/wide" for 10.212.117.130 at 2015-07-15 08:28:29 +0200
Processing by RepositoriesController#show as HTML
  Parameters: {"id"=>"wide", "repository_id"=>"wide"}
  Current user: a04 (id=3)
  Rendered common/error.html.erb within layouts/base (0.2ms)
Completed 404 Not Found in 44ms (Views: 14.3ms | ActiveRecord: 3.5ms)

The first request looks like I've just added the repository to the project.
The second one is when I clicked on the repository.

Maybe this is something related to an SELinux error, but i can't find anything in the logs.

RE: Git+Redmine: The entry or revision was not found in the repository - Added by Pablo Estiga over 3 years ago

I have successfully cloned all my git repos in gitlab, and done an ansible role that could help anyone:

https://github.com/CoffeeITWorks/ansible_redmine_git_sync

Hope this will help you.

(1-5/5)