I am making a git clone request from PHP using exec with rsa verification. This process seems to start ok, however, I soon get the error
Could not create directory 'var/www/.ssh'
I had thought that I had overcome having apache look to its own directory with ssh-add, however, this seems nots to be the case. My two lines:
exec('/usr/bin/ssh-add /path/to/home/dir/id_rsa > ssh.log.txt 2>&1');
exec('/usr/local/bin/git clone [email protected]:etc.git > git.log.txt 2>&1');
Is there a way to have the apache user call .git using an rsa key when you are on restricted shared hosting that won't let you touch /var/www/?