Skip to content

Hooks URL returns 404 #688

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
EvilBMP opened this issue Aug 18, 2017 · 7 comments
Closed

Hooks URL returns 404 #688

EvilBMP opened this issue Aug 18, 2017 · 7 comments

Comments

@EvilBMP
Copy link

EvilBMP commented Aug 18, 2017

Sorry, I didn't find any information on the web regarding this topic so I open an issue. I installed redmine_git_hosting today as documentated on the website.

Server/ Software configuration is Ubuntu 14.04 LTS with Ruby 2.1.3 and Redmine 3.2. Redmine is served by Puma which is proxied by an Apache2 webserver, as other tools are running on that server as well.

Well everything seems to work - I installed the hooks via GUI link in the configuration section and the symlinks are added to the git repositories via gitolite. Config test is all green. But when I push something the post-receive hooks are not called.

So I tried to debug this and started with a call of the Hooks URL in my web browser, which results in a 404.

Called: https://hostname/githooks/post-receive/redmine

That should not be the case?! Any idea?

@drewlsvern
Copy link

I just set this plugin up today as well, I have the same issue. Although my config-test shows that no hooks are installed.

My config is a bit different than @EvilBMP has.

Ubuntu 16.04 LTS
Ruby 2.4.1
Rails 4.2.8
Redmine 3.4.4
Gitolite 2.7.4

I have attached a screenshot of my config test.

Any help would be much appreciated.

capture

@EvilBMP
Copy link
Author

EvilBMP commented Jan 18, 2018

To shed some light on the dark, I want to add some notes to this topic.

First, the hooks always execute, if you push via ssh.
Second, if you push via http(s) - DAV - then repository name must be the same as the project identifier. Otherwise it will not work. This is a bug/ limitation in Redmine, not in Gitolite!
So, if you have multiple repositories per project, pushing via http(s) will Work only for the main (respectively the repo with name=project identifier) repository.

That's why we completely switched from http(s) to ssh authentication with private/ public keys for every developer.

@cbobof
Copy link

cbobof commented Jun 5, 2019

Hello,
I have exactly te same problem, my git repositories are never refresh.
my configuration seems clean
when i check hooks url, it returns 404 error and the path "githooks/post-receive/redmine" doesn't match with anything on redmine host.
do you know what am I doing wrong ?

capture

@n-rodriguez
Copy link
Contributor

when i check hooks url, it returns 404 error and the path "githooks/post-receive/redmine" doesn't match with anything on redmine host.

It's a POST url, it won't work in your browser.

@n-rodriguez
Copy link
Contributor

n-rodriguez commented Jun 5, 2019

POST  /githooks/post-receive/:type/:projectid  #<Rack::Builder:0x00563aa1aca350 @run=#<Hrack::Server:0x00563aa1aca1e8>, @map=nil, @use=[#<Proc:0x00563aa1aca210@/data/www/redmine/shared/bundle/ruby/2.3.0/gems/rack-1.4.7/lib/rack/builder.rb:82>]>

@cbobof
Copy link

cbobof commented Jun 6, 2019

thank you, i had error in my url.

@PowerKiKi
Copy link
Collaborator

As discussed in #732 (comment), issues related to Redmine < 4.0 or severely outdated issues are being closed to help clean up the issue tracker.

If this issue is still relevant to you and you are running Redmine >= 4.0, please open a new issue including all new relevant information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants