protected function suggestSshRemedies()
    {
        $sshKeys = [];
        try {
            $sshKeys = $this->api()->getClient(false)->getSshKeys();
        } catch (\Exception $e) {
            // Ignore exceptions.
        }

        if (!empty($sshKeys)) {
            $this->stdErr->writeln('');
            $this->stdErr->writeln('Please check your SSH credentials');
            $this->stdErr->writeln(sprintf(
                'You can list your keys with: <comment>%s ssh-keys</comment>',
                $this->config()->get('application.executable')
            ));
        } else {
            $this->stdErr->writeln(sprintf(
                'You probably need to add an SSH key, with: <comment>%s ssh-key:add</comment>',
                $this->config()->get('application.executable')
            ));
        }
    }
protected function suggestSshRemedies()
    {
        $sshKeys = [];
        try {
            $sshKeys = $this->api()->getClient(false)->getSshKeys();
        } catch (\Exception $e) {
            // Ignore exceptions.
        }

        if (!empty($sshKeys)) {
            $this->stdErr->writeln('');
            $this->stdErr->writeln('Please check your SSH credentials');
            $this->stdErr->writeln(sprintf(
                'You can list your keys with: <comment>%s ssh-keys</comment>',
                $this->config()->get('application.executable')
            ));
        } else {
            $this->stdErr->writeln(sprintf(
                'You probably need to add an SSH key, with: <comment>%s ssh-key:add</comment>',
                $this->config()->get('application.executable')
            ));
        }
    }
protected function suggestSshRemedies ( ) { $ sshKeys = [ ] ; try { $ sshKeys = $ this -> api ( ) -> getClient ( false ) -> getSshKeys ( ) ; } catch ( \ Exception $ e ) { // Ignore exceptions. } if ( ! empty ( $ sshKeys ) ) { $ this -> stdErr -> writeln ( '' ) ; $ this -> stdErr -> writeln ( 'Please check your SSH credentials' ) ; $ this -> stdErr -> writeln ( sprintf ( 'You can list your keys with: <comment>%s ssh-keys</comment>' , $ this -> config ( ) -> get ( 'application.executable' ) ) ) ; } else { $ this -> stdErr -> writeln ( sprintf ( 'You probably need to add an SSH key, with: <comment>%s ssh-key:add</comment>' , $ this -> config ( ) -> get ( 'application.executable' ) ) ) ; } }
Suggest SSH key commands for the user, if the Git connection fails.
Suggest SSH key commands for the user if the Git connection fails .