Closed deurk closed 13 years ago
Your best bet (and probably only) is to investigate the logfile on your Redmine server. If necessary, run Redmine in development mode to get the logfile to contain more useful data.
Please return with more details if it turns out to be an issue with redmine_github_hook. For what it's worth, I am using it with Redmine 1.0.3.devel.4416 without problems.
Hi, first thanks for your reply.
Seems like redmine gets the payload since when I push my logs to info, here is what I get:
Processing GithubHookController#index (for 173.203.140.221 at 2010-12-06 14:26:50) [POST]
Parameters: {"project_id"=>"test", "payload"=>"{\"repository\":{\"created_at\":\"2010/12/05 05:52:10 -0800\",\"has_downloads\":true,\"url\":\"https://github.com/deurk/test\",\"pushed_at\":\"2010/12/06 02:46:26 -0800\",\"description\":\"\",\"has_wiki\":true,\"fork\":false,\"open_issues\":0,\"private\":false,\"watchers\":1,\"has_issues\":true,\"owner\":{\"email\":\"github@deurk.net\",\"name\":\"deurk\"},\"forks\":1,\"name\":\"test\",\"homepage\":\"\"},\"ref\":\"refs/heads/master\",\"commits\":[{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-05T15:09:16-08:00\",\"url\":\"https://github.com/deurk/test/commit/00444304c267e79df2e4ebded089b7e6fea96726\",\"message\":\"...\",\"removed\":[],\"modified\":[\"README\"],\"added\":[],\"id\":\"00444304c267e79df2e4ebded089b7e6fea96726\"},{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-05T15:18:03-08:00\",\"url\":\"https://github.com/deurk/test/commit/e02d3a5bbd0eaf057cf834f2003b6255c8c9ab9c\",\"message\":\"It will succeed\",\"removed\":[],\"modified\":[\"README\"],\"added\":[],\"id\":\"e02d3a5bbd0eaf057cf834f2003b6255c8c9ab9c\"},{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-06T02:46:20-08:00\",\"url\":\"https://github.com/deurk/test/commit/3209f76bcd8e61886ec458b4dd5c7ffa74795c37\",\"message\":\"Bleh\",\"removed\":[],\"modified\":[\"README\"],\"added\":[],\"id\":\"3209f76bcd8e61886ec458b4dd5c7ffa74795c37\"}],\"compare\":\"https://github.com/deurk/test/compare/fcf33f8...3209f76\",\"forced\":false,\"before\":\"fcf33f8bf591af7e081df84ff8405a62a4e268cf\",\"after\":\"3209f76bcd8e61886ec458b4dd5c7ffa74795c37\"}", "action"=>"index", "controller"=>"github_hook"}
Completed in 41ms (View: 0, DB: 3) | 200 OK [http://qw-dev.net/github_hook]
Any idea what could (not) be happening?
Here is debug output:
Processing GithubHookController#index (for 207.97.227.235 at 2010-12-06 14:45:44) [POST]
Parameters: {"project_id"=>"test", "payload"=>"{\"repository\":{\"created_at\":\"2010/12/05 05:52:10 -0800\",\"pushed_at\":\"2010/12/06 02:46:26 -0800\",\"has_downloads\":true,\"description\":\"\",\"url\":\"https://github.com/deurk/test\",\"has_wiki\":true,\"fork\":false,\"open_issues\":0,\"private\":false,\"watchers\":1,\"has_issues\":true,\"owner\":{\"email\":\"github@deurk.net\",\"name\":\"deurk\"},\"forks\":1,\"name\":\"test\",\"homepage\":\"\"},\"commits\":[{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-05T15:09:16-08:00\",\"message\":\"...\",\"removed\":[],\"url\":\"https://github.com/deurk/test/commit/00444304c267e79df2e4ebded089b7e6fea96726\",\"modified\":[\"README\"],\"added\":[],\"id\":\"00444304c267e79df2e4ebded089b7e6fea96726\"},{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-05T15:18:03-08:00\",\"message\":\"It will succeed\",\"removed\":[],\"url\":\"https://github.com/deurk/test/commit/e02d3a5bbd0eaf057cf834f2003b6255c8c9ab9c\",\"modified\":[\"README\"],\"added\":[],\"id\":\"e02d3a5bbd0eaf057cf834f2003b6255c8c9ab9c\"},{\"author\":{\"email\":\"deurk@deurk.net\",\"name\":\"deurk\"},\"timestamp\":\"2010-12-06T02:46:20-08:00\",\"message\":\"Bleh\",\"removed\":[],\"url\":\"https://github.com/deurk/test/commit/3209f76bcd8e61886ec458b4dd5c7ffa74795c37\",\"modified\":[\"README\"],\"added\":[],\"id\":\"3209f76bcd8e61886ec458b4dd5c7ffa74795c37\"}],\"forced\":false,\"compare\":\"https://github.com/deurk/test/compare/fcf33f8...3209f76\",\"before\":\"fcf33f8bf591af7e081df84ff8405a62a4e268cf\",\"ref\":\"refs/heads/master\",\"after\":\"3209f76bcd8e61886ec458b4dd5c7ffa74795c37\"}", "action"=>"index", "controller"=>"github_hook"}
SQL (0.3ms) SELECT max(`settings`.updated_on) AS max_updated_on FROM `settings`
AnonymousUser Load (0.2ms) SELECT * FROM `users` WHERE ( (`users`.`type` = 'AnonymousUser' ) ) LIMIT 1
Setting Load (0.1ms) SELECT * FROM `settings` WHERE (`settings`.`name` = 'default_language') LIMIT 1
Project Load (0.2ms) SELECT * FROM `projects` WHERE (`projects`.`identifier` = 'test') LIMIT 1
Repository Load (0.1ms) SELECT * FROM `repositories` WHERE (`repositories`.project_id = 45) LIMIT 1
Repository Columns (0.5ms) SHOW FIELDS FROM `repositories`
Repository::Git Columns (0.4ms) SHOW FIELDS FROM `repositories`
GithubHook: Executing command: 'cd '/var/git/test/.git' && git fetch origin && git reset --soft refs/remotes/origin/master'
GithubHook: Output from git:
GithubHook: * STDOUT:
GithubHook: * STDERR:
Changeset Load (0.5ms) SELECT * FROM `changesets` WHERE (`changesets`.repository_id = 86) ORDER BY committed_on DESC, changesets.committed_on DESC, changesets.id DESC LIMIT 1
Changeset Columns (0.5ms) SHOW FIELDS FROM `changesets`
Shelling out: git --git-dir '/var/git/test/.git/' log --no-color --raw --date=iso --pretty=fuller --all --since='2010-11-29 00:18:03'
Changeset Load (0.6ms) SELECT * FROM `changesets` WHERE (`changesets`.repository_id = 86 AND (committed_on >= '2010-11-29 00:18:03')) ORDER BY changesets.committed_on DESC, changesets.id DESC
Completed in 40ms (View: 0, DB: 3) | 200 OK [http://qw-dev.net/github_hook]
No output at all from git looks suspicious. Are you able to run the logged command on the server as the user your Redmine is running as?
cd '/var/git/test/.git' && git fetch origin && git reset --soft refs/remotes/origin/master
Ok, narrowed it down to the webserver user having no login shell available. Sorry to have bothered you.
Has been tried after verifying that post-receive hook works from Github and nothing happens on Redmine.
Any way to debug what is going on?