I did not find the perfect answer to my question, but the workaround here is OK.
You can override the default download of the Heroku script (and much more) by creating a file called Procfile in the root of your project.
Here's the procfile:
web: sh /app/config/web-boot.sh
He tells Herok that this script loads Redmine.
I use Bitbucket with a private repository, so I created an SSH key pair and put them in 'config / ssh /'. Then I added the public key to my Bitbucket account deployment keys and added the Bitbucket public key to the file "config / ssh / know_hosts"
Here is the config / web-boot.sh file:
mkdir /app/.ssh
cp /app/config/ssh/* /app/.ssh/
mkdir /tmp/repos
git clone --bare ssh://git@bitbucket.org/[YOUR_ACCOUNT]/[YOUR_REPO].git /tmp/repos/[YOUR_REPO]
git --git-dir=/tmp/repos/[YOUR_REPO] remote add origin ssh://git@bitbucket.org/[YOUR_ACCOUNT]/[YOUR_REPO].git
git --git-dir=/tmp/repos/[YOUR_REPO] fetch origin
cd /app
bundle exec unicorn -p $PORT -c ./config/unicorn.rb
Then you can simply add the Git repository to your Redmine project by specifying '/ tmp / repos / [YOUR_REPO]'
Redmine Bitbucket Hook plugin, Bitbucket.
, , , .