Apparently this was the problem. I had asked a collaborator to do it for me and neglected to explain that we need a secret phrase. He added it and the signatures are validating properly.
Now I have a different problem. For some reason Apache is having trouble executing the git pull command. Here's my function (part of a CodeIgniter method):
public function git_pull() {
$this->gitlog->write("PREPARING TO RUN GIT PULL");
// this is a temporary command for testing
$cmd = "sudo /usr/bin/git -C /home/sneakyimp/git-test pull";
$this->gitlog->write("cmd:\n" . $cmd);
$output = NULL;
$return_var = NULL;
exec($cmd, $output, $return_var);
if ($return_var) {
// uh oh
$this->gitlog->write("ERROR!!! Git-pull script returned non-empty value: " . $return_var);
}
$this->gitlog->write("===== GIT PULL OUTPUT =====");
$this->gitlog->write(implode(PHP_EOL, $output));
$this->gitlog->write("===== END GIT PULL OUTPUT =====");
}
Here's the output in the log file:
[2015-03-12 12:26:12] - PREPARING TO RUN GIT PULL
[2015-03-12 12:26:12] - cmd:
sudo /usr/bin/git -C /home/sneakyimp/git-test pull
[2015-03-12 12:26:12] - ERROR!!! Git-pull script returned non-empty value: 1
[2015-03-12 12:26:12] - ===== GIT PULL OUTPUT =====
[2015-03-12 12:26:12] -
[2015-03-12 12:26:12] - ===== END GIT PULL OUTPUT =====
I'm not sure what the problem is. And it's REALLY ANNOYING that I don't get any kind of error message in the output. This is in the sudoers file:
apache ALL=(ALL) NOPASSWD: /usr/bin/git -C /home/sneakyimp/git-test pull
And this command works absolutely fine when I type it from the command line:
sudo -Hu apache sudo /usr/bin/git -C /home/sneakyimp/git-test pull
Any hints would be welcome. I'm not really sure how I'm going to solve this problem 🙁