leetcode.net has written an excellent GitHub integration plugin for the Mantis BugTracker. It allows you to reference issues by their #id in your commit message. You can close an issue simple by adding „fixed #35“ in your git commit message.

Unfortunatly there is only poor documentation for the GitHub integration. I also had some problems with the „MantisBT“ post commit hook on the GitHub repository configuration. So, I did some code analysis and added a „Post-Receive-URL“ to my GitHub repo:
http://<server>/<path_to_mantis>/plugin.php?page=Source/import&id=<repository_id>

To allow remote imports of new commits, you have to set the following checkboxes and IP addresses in your MantisBT configuration.

Using Mantis 1.2.8, the „Allow Remote Check-In“ option is deprecated. Instead, you can generate a random API key (any string will do) and set it in the „API Key“ field of the Source Control Integration configuration page. On Github, use the MantisBT service hook, entering your base Mantis URL (without the plugin.php?xxx part) and the API key you generated earlier. Worked for me!
Thanks for your comment. I will try it soon. 🙂