fallback to standard ssh when no key is found in store
This commit is contained in:
parent
c4b98a09ed
commit
6967e3e749
1 changed files with 19 additions and 22 deletions
7
agent.go
7
agent.go
|
|
@ -85,11 +85,7 @@ func startSSH(storePath string, args []string) {
|
|||
|
||||
if host != "" {
|
||||
pemData, err := findKey(storePath, user, host)
|
||||
if err != nil {
|
||||
fmt.Println("Error:", err)
|
||||
os.Exit(1)
|
||||
}
|
||||
|
||||
if err == nil {
|
||||
targetName := host
|
||||
if user != "" {
|
||||
targetName = user + "@" + host
|
||||
|
|
@ -110,6 +106,7 @@ func startSSH(storePath string, args []string) {
|
|||
}
|
||||
env = newEnv
|
||||
}
|
||||
}
|
||||
|
||||
sshPath, err := exec.LookPath("ssh")
|
||||
if err != nil {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue