I have a web interface for deploying scripts from our repo at Github to our live server. The web interface just triggers a bash script with some git commands. If I make
changes locally, push to repo, then run the bash script to pull from repo to live it works fine. However, if I make
changes directly in the repo (via Github's web interface), I'm running into fast-forward / lock issues.
These are the steps I'm taking:
Make a change on a file at Github repo
Run a bash script (as apache) via web from live server that attempts a git push / pull. Get these problems:
PUSH
To
[email protected]:name/name.git
! [rejected] master - master (non-fast-forward)
error: failed to push some refs to '
[email protected]:name/name.git'
To prevent you from losing history, non-fast-forward updates were rejected
Merge the remote
changes before pushing again. See the 'Note about
fast-forwards' section of 'git push --help' for details.
PULL
From github.com:name/name
branch master - FETCH_HEAD
error: unable to unlink old 'includes/footer.inc' (Permission denied)
Updating 8f6d922..d1eba9d
Updating 8f6d922..d1eba9d
SSH in as root, attempt a push / pull and it works fine.
Ideas on why would this method not work from apache?