From 95e715c8a53aa445ca9c85d0b159f1df2ab591ca Mon Sep 17 00:00:00 2001 From: Jason Kulatunga Date: Fri, 20 Apr 2018 16:47:22 -0700 Subject: [PATCH] fix type mismatch. --- pkg/actions/connect.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/actions/connect.go b/pkg/actions/connect.go index 42321bb..8b4494f 100644 --- a/pkg/actions/connect.go +++ b/pkg/actions/connect.go @@ -99,9 +99,9 @@ func (e *ConnectAction) SshAgentAddPemKey(pemFilepath string) error { if x509.IsEncryptedPEMBlock(block) { //inform the user that the key is encrypted. passphrase := utils.StdinQuery(fmt.Sprintf("The key at %v is encrypted and requires a passphrase. Please enter it below:", pemFilepath)) - privateKeyData, err = ssh.ParseRawPrivateKeyWithPassphrase(block, []byte(passphrase)) + privateKeyData, err = ssh.ParseRawPrivateKeyWithPassphrase(block.Bytes, []byte(passphrase)) } else { - privateKeyData, err = ssh.ParseRawPrivateKey(block) + privateKeyData, err = ssh.ParseRawPrivateKey(block.Bytes) } // register the privatekey with ssh-agent