Defect #33757

Cannot get Revisions to work or Issues to link to Commits.

Added by jason shultz 10 months ago. Updated about 1 month ago.

Status:Needs feedbackStart date:
Priority:NormalDue date:
Assignee:-% Done:

0%

Category:Projects
Target version:-
Resolution: Affected version:

Description

I have read so many things about how to integrate Git into Redmine. I've tried the git-hook plugin but it still didn't show revisions or issues tied to commits. Here's what I have right now:

Every 5 minutes these two cron jobs run:

*/5 * * * * deploy cd /home/deploy/github_repo/ && ./git_checker.sh
*/5 * * * * deploy cd /home/deploy/apps-available/redmine/ && ./bin/rails runner "Repository.fetch_changesets" -e production

The git_checker.sh file runs the following command in each project directory:

git fetch origin +refs/heads/*:refs/heads/* && git reset --soft

Here's the settings for repositories:

This is an example of what my projects repository settings look like:

Here you can see the repository for the project. You'll see that there's no revisions:

Here you'll see the file I changed. It shows revision numbers, but if I click on them I get a 404.

The History tab is empty when I click on the file that changed:

--- ENVIRONMENT ---

sh: 1: svn: not found
sh: 1: hg: not found
sh: 1: cvs: not found
sh: 1: bzr: not found
Environment:
  Redmine version                4.1.0.devel
  Ruby version                   2.6.5-p114 (2019-10-01) [x86_64-linux]
  Rails version                  5.2.4.2
  Environment                    production
  Database adapter               Mysql2
  Mailer queue                   ActiveJob::QueueAdapters::AsyncAdapter
  Mailer delivery                smtp
SCM:
  Git                            2.17.1
  Filesystem
Redmine plugins:
  additionals                    2.0.23
  redmine_agile                  1.5.3
  redmine_checklists             3.1.16
  redmine_contacts               4.3.0
  redmine_edit_custom_fields     0.0.5
  redmine_github_hook            3.0.1
  redmine_pretend                2.0.1
  redmine_user_import            0.1.0

screenshot-itsupport.bcfoods.com-2020.07.21-00_13_20.png (164 KB) Holger Just, 2020-07-28 15:26

screenshot-itsupport.bcfoods.com-2020.07.21-00_28_21.png (59.4 KB) Holger Just, 2020-07-28 15:28

screenshot-itsupport.bcfoods.com-2020.07.21-00_13_20.png (164 KB) Holger Just, 2020-07-28 15:28

screenshot-itsupport.bcfoods.com-2020.07.21-00_39_06.png (161 KB) Holger Just, 2020-07-28 15:29

screenshot-itsupport.bcfoods.com-2020.07.21-00_36_57.png (40.9 KB) Holger Just, 2020-07-28 15:30

History

#2 Updated by Holger Just 9 months ago

  • Status changed from New to Needs feedback

make sure that the user running Redmine (that is: the application server process) is able to access the repositories on the file system. The actual user might be different from the deploy user which you are using to run the Repository.fetch_changesets command.

Also, please have a look into your logs (in logs/production.log and probably log/production.scm.stderr.log) to find why Redmine fails to access the commits.

#3 Updated by jason shultz 9 months ago

I've had a stackoverflow issue open about this as well if that helps: https://stackoverflow.com/questions/63008890/how-can-i-get-revisions-and-git-issue-linking-working-in-redmine

It's been going for about a week now, still trying to figure out what's happening.

How can I find out what user Redmine is running under?

#4 Updated by jason shultz 9 months ago

I'm using nginx with passenger.

#5 Updated by Janeks Kamerovskis about 1 month ago

I have similar problem.
I used this tutorial.
I can add my repo in redmine.
I can choose branches and browse it, but there are no revision info in table and also no integration messages are linking to issues.

What could be wrong?

Also available in: Atom PDF