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

Comments

Projects
None yet
2 participants
@saz

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

This comment has been minimized.

Show comment
Hide comment
@saz

saz Feb 23, 2015

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

ssh://gitolite@redmine.example.com/entwicklung-allgemein/herocentral.git

saz commented Feb 23, 2015

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

ssh://gitolite@redmine.example.com/entwicklung-allgemein/herocentral.git
@saz

This comment has been minimized.

Show comment
Hide comment
@saz

saz 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 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

This comment has been minimized.

Show comment
Hide comment
@saz

saz Feb 23, 2015

I've fixed the hooks URL in the settings.

saz commented Feb 23, 2015

I've fixed the hooks URL in the settings.

@saz

This comment has been minimized.

Show comment
Hide comment
@saz

saz 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:

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

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 24, 2015

Member

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.

Member

n-rodriguez commented Feb 24, 2015

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

This comment has been minimized.

Show comment
Hide comment
@n-rodriguez

n-rodriguez Feb 24, 2015

Member

Fixed in commit cbb6f00.

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

Member

n-rodriguez commented Feb 24, 2015

Fixed in commit cbb6f00.

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

@n-rodriguez n-rodriguez changed the title from After upgrade to 1.0, Redmine won't show changesets to Gitolite hook silently fails on HTPP redirect Feb 24, 2015

@n-rodriguez n-rodriguez changed the title from Gitolite hook silently fails on HTPP redirect to 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