Mirror to GitHub


NOTE: For mirroring to Github using public/private key pair (deploy keys) see https://github.com/s-kostyaev/stash-mirror-with-key


Script #

Place the following script under the atlassian-bitbucket-home-dir/external-hooks/mirror-github path:

#!/bin/sh
exec git push --mirror "git@github.com:$1/$2"

Configuration #

Type: Post Receive
Executable: mirror-github
Safe mode: [v]
Positional arguments:

  1. Username on github.com.
  2. Repo to mirror to.