I've got a git repository on a webserver (Apache), which is set up inside the home-directory of user a.
git clone ssh://a@git_url:7999/path/to/repository/repo.git
The git-repository is hosted on a stash-server. The authentication works via an ssh-key for the user a.
Now I'm trying to build a CGI-script which shows me some excerpts from git log on that repository. That works pretty much, but I just can't seem to be able to git pull inside the CGI-script since it's not run by user a, but by user nobody. The user nobody has no permissions to read the contents of the git-repository cloned by a and doesn't have an ssh-key set up on the stash-server.
Is there a way to run git pull from within the CGI-script in a way that it "masks" as user a so that it's able to pull?