別のユーザーの git ディレクトリ内で git pull を実行したいスクリプトがあります。このスクリプトは root ユーザーによって実行されます。例えば:
cd /home/username/GitProject
sudo -u username -i git pull
これを実行すると、次のようになります。
fatal: Not a git repository (or any of the parent directories): .git
スクリプトに git pull を実行させる方法はありusername
ますか?