Skip to content
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

Gitolite hook silently fails on HTTP redirect #364

Closed
saz opened this issue Feb 23, 2015 · 6 comments
Closed

Gitolite hook silently fails on HTTP redirect #364

saz opened this issue Feb 23, 2015 · 6 comments
Assignees
Milestone

Comments

@saz
Copy link

saz commented Feb 23, 2015

I've upgraded to the new stable version 1.0, but after the upgrade, Redmine no longer shows any changesets. All commits have a refs #1234 or fixes #1234 are not shown at the issue detail view.

Hooks seem to be working, as the following is shown, if I'm running the hooks in non-async mode with debugging enabled:

remote:
remote: Notifying Redmine about changes to this repository : 'herocentral/' ...
remote: Looking for additional global post-receive hooks...
remote:
remote: Looking for additional local post-receive hooks...
remote:   - No local hooks found
remote:
remote: Calling additional post-receive hooks...
remote:   - Executing extra hook 'hooks/post-receive.d/mail_notifications'
remote:     multimailhook is disabled
remote:
@saz
Copy link
Author

saz commented Feb 23, 2015

The only strange thing I can see, is the repository name, as the repository URL for cloning is

ssh://[email protected]/entwicklung-allgemein/herocentral.git

@saz
Copy link
Author

saz commented Feb 23, 2015

.gitconfig content:

[hooks "redmine_gitolite"]
        url = http://tracker.example.com/githooks/post-receive
        debug = true
        asynch = true
[redminegitolite]
        redmineurl = http://tracker.example.com/githooks/post-receive/redmine
        debugmode = true
        asyncmode = false
[multimailhook]
        mailer = sendmail
        environment = gitolite
        smtpauth = false
        smtpserver = localhost
        smtpport = 25

My Redmine installation is using https://, this is the only obvious error I'm seeing in this URL (but it gets redirected, at least in the browser).

Trying to open redmineurl, will result in a 404 Page not found error message, but I don't know, if there is a part of the URL missing.

@saz
Copy link
Author

saz commented Feb 23, 2015

I've fixed the hooks URL in the settings.

@saz
Copy link
Author

saz commented Feb 23, 2015

It's working now. Maybe there should be an error message, if the hooks URL isn't working. Now it's showing the following during a push:

remote:
remote: Notifying Redmine about changes to this repository : 'herocentral/' ...
remote:
remote:   - Fetching changesets for 'herocentral' repository ...  [success]
remote:
remote: Looking for additional global post-receive hooks...
remote:
remote: Looking for additional local post-receive hooks...
remote:   - No local hooks found
remote:
remote: Calling additional post-receive hooks...
remote:   - Executing extra hook 'hooks/post-receive.d/mail_notifications'
remote:     multimailhook is disabled
remote:

@n-rodriguez
Copy link
Contributor

My Redmine installation is using https://, this is the only obvious error I'm seeing in this URL (but it gets redirected, at least in the browser).

This is the cause of the 'bug'. The hook expect a 200 status code and not a 301.

@n-rodriguez n-rodriguez self-assigned this Feb 24, 2015
@n-rodriguez n-rodriguez added this to the v1.0.2 milestone Feb 24, 2015
@n-rodriguez
Copy link
Contributor

Fixed in commit cbb6f00.

Hook will throw an error if the status code is not a 200.

@n-rodriguez n-rodriguez changed the title After upgrade to 1.0, Redmine won't show changesets Gitolite hook silently fails on HTPP redirect Feb 24, 2015
@n-rodriguez n-rodriguez changed the title Gitolite hook silently fails on HTPP redirect Gitolite hook silently fails on HTTP redirect Feb 25, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants