-
Notifications
You must be signed in to change notification settings - Fork 0
shogsbro/website-sync
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
website-sync ============ Scripts used to hook into post-receive chain of gitolite, such that when an authorised user pushes certain branches to the repository, the content is synced to a (remote) webhost. website-sync is invoked on the gitolite host, by the post-receive hook website-pull is invoked on the webserver host, via SSH from website-sync Assumptions ----------- 1) ~/.ssh/config of the gitolite user is setup to forward SSH connections to 'webhost' to the correct server. 2) website-pull is setup in ~/.ssh/authorized_keys to be invoked whenever an incoming SSH connection with the relevant SSH key is received (as it uses SSH_ORIGINAL_COMMAND to retrieve the arguments). 3) that an executable script exists on the webserver host relative to the login path, with the name of the repository. This will likely need to do: $ git fetch -q --all $ git --bare update-server-info $ export GIT_WORK_TREE=/srv/... $ git reset -q --hard $branch $ git checkout -qf $branch 4) Git repo's on the webhost have been mirror-cloned using: git clone --mirror <remote git url>
About
Git post-receive hook for website sync
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published