Created
May 17, 2019 12:01
-
-
Save nderjung/8eefefb8ff167222dc7850c58689064a to your computer and use it in GitHub Desktop.
Git mirror via post-receive hook
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
[email protected]:nderjung/my-cool-mirror.git | |
SSH_KEY=~/.ssh/id_my_cool_mirror | |
GIT_DIR=${GIT_DIR:-$(dirname $0)} | |
GIT_SSH_COMMAND="ssh -i $SSH_KEY -F /dev/null -oStrictHostKeyChecking=no" git push --mirror $GIT_REMOTE_REPO |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment