apache
コメントの説明から、問題はユーザーがリポジトリに書き込めないことであるように思われます。これは、を使用するときに明らかに必要ですgit pull
。2つの行動方針があります。
- 別のユーザーとしてスクリプトを実行するようにApacheをセットアップします(たとえば、VirtualHostまたはuserdirを介してsuEXECを使用します)
apache
ユーザーがリポジトリに書き込めるように、リポジトリの権限を変更します
どちらを選択してもセキュリティへの影響を慎重に検討する必要がありますが、2番目のオプションがおそらく最も簡単です。そのようなグループをまだ持っていない場合は、次のコマンドで作成できます。
addgroup gitwriters
...次に、自分自身とApacheユーザーをこのグループに追加します。
adduser [yourusername] gitwriters
adduser apache gitwriters
次に、別の質問の指示に従って、リポジトリの権限を変更できます。若干の違いがあるものを繰り返すには:
# Recursively, set the group ownership of every file and directory of your repository:
chgrp -R gitwriters /path/to/your/repo
# Recursively, make every file and directory of your repository readable and writable
# by the group:
chmod -R g+rw /path/to/your/repo
# Recursively, set the setgid of every directory in the repository. The setgid bit
# on directories means that files created in the directory will have the same group
# ownership as the directory.
find /path/to/your/repo -type d -print0 | xargs -0 chmod g+s
その後、うまくいけばあなたはうまくgit pull
いくはずです。