From 02632f8799af389aae27ef31805db915dd08815e Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Thu, 16 May 2013 11:57:47 -0400 Subject: [PATCH 1/2] Bugfix: Remote GitHub builds fail --- PHPCI/Model/Build/RemoteGitBuild.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPCI/Model/Build/RemoteGitBuild.php b/PHPCI/Model/Build/RemoteGitBuild.php index e11dde92..aafb4c8a 100644 --- a/PHPCI/Model/Build/RemoteGitBuild.php +++ b/PHPCI/Model/Build/RemoteGitBuild.php @@ -65,7 +65,7 @@ abstract class RemoteGitBuild extends Build // Use the key file to do an SSH clone: $cmd = 'ssh-agent ssh-add "%s" && git clone -b %s %s "%s" && ssh-agent -k'; - $success = $builder->executeCommand($cmd, $keyFile, $build->getBranch(), $this->getCloneUrl(), $to); + $success = $builder->executeCommand($cmd, $keyFile, $this->getBranch(), $this->getCloneUrl(), $to); // Remove the key file: unlink($keyFile); From abcc5f13d81590f7f47a838c82a571163dcb6295 Mon Sep 17 00:00:00 2001 From: Steve Kamerman Date: Thu, 16 May 2013 14:20:40 -0400 Subject: [PATCH 2/2] Fixed GitHub Remote SSH build authentication errors --- PHPCI/Model/Build/RemoteGitBuild.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/PHPCI/Model/Build/RemoteGitBuild.php b/PHPCI/Model/Build/RemoteGitBuild.php index 0ec2fc9f..0670f6db 100644 --- a/PHPCI/Model/Build/RemoteGitBuild.php +++ b/PHPCI/Model/Build/RemoteGitBuild.php @@ -76,7 +76,7 @@ abstract class RemoteGitBuild extends Build chmod($keyFile, 0600); // Use the key file to do an SSH clone: - $cmd = 'ssh-agent ssh-add "%s" && git clone -b %s %s "%s" && ssh-agent -k'; + $cmd = 'eval `ssh-agent -s` && ssh-add "%s" && git clone -b %s %s "%s" && ssh-agent -k'; $success = $builder->executeCommand($cmd, $keyFile, $this->getBranch(), $this->getCloneUrl(), $to); // Remove the key file: