Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save dchapkine/9d2b26f3e253e7aff15b450108186f4d to your computer and use it in GitHub Desktop.
Save dchapkine/9d2b26f3e253e7aff15b450108186f4d to your computer and use it in GitHub Desktop.
How to Install redmine_bitbucket plugin for bitnami redmine
# Install redmine_bitbucket plugin, by following instructions in README
https://bitbucket.org/steveqx/redmine_bitbucket
# create new ssh key
ssh-keygen -t rsa -C "contact@example.com"
# add public key to your bitbucket account as deploy key
cat ~/.ssh/id_rsa.pub
# answer yes to add bitbucket to known hosts
sudo ssh git@bitbucket.org
#
# make daemon aware of our ssh deploy key
#
# It's dirty, yes. But what else can i do ?
# make sure its writable
sudo chmod -R 777 bitbucket_repos/
# change home dir and shell of the "daemon" user to "daemon:x:1:1:daemon:/home/daemon:/bin/bash" in /etc/passwd
# IDs might be different oj your installation, but "/home/daemon" and "/bin/bash" must be set to same values
sudo emacs /etc/passwd
# create home for daemon
sudo mkdir /home/daemon
# chown/chmod
sudo chown -R daemon:daemon /home/daemon/
# copy ssh ids
sudo mkdir /home/daemon/.ssh
sudo cp -R ~/.ssh/* /home/daemon/.ssh/
sudo chown -R daemon:daemon /home/daemon/
sudo /opt/bitnami/ctlscript.sh restart apache
# configure hook (i assume your project is called "oreshek" and your domain "redmine.example.com")
http://redmine.example.com/hooks/bitbucket/oreshek?key=Or4IlN8nHFiZ8Vt64yDbLh6Qt5N39e
add the secret "Or4IlN8nHFiZ8Vt64yDbLh6Qt5N39e" in your plugin configuration (redmine->admin->plugins->bitbucker_redmine).
obviously...change the secret
# make a commit, check hook requests
now, be aware of the fact that bitbucket will say "request timeout" if you have large repository.
this actualy means that it worked... and next time the hook will hit your redmine, it will return "200 OK"
# in case something is ****ed up, check logs, that's how i debugged issues
cat /opt/bitnami/apps/redmineplusagile/htdocs/log/production.log | tail
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment