Example #1
0
 public function get()
 {
     $publicKeyPath = config('git.public_key');
     if (!is_file($publicKeyPath)) {
         SSH::writeKeyPair(config('dogpro'), config('git.public_key'), config('git.private_key'));
     }
     $public = file_get_contents($publicKeyPath);
     return ['public_key' => $public];
 }
Example #2
0
 protected function generateKeys()
 {
     $key = SSH::generateKeyPair(sprintf("%s@dogpro", $this->name));
     $this->public_key = $key['publickey'];
     $this->private_key = $key['privatekey'];
 }