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 != "" {
|
if host != "" {
|
||||||
pemData, err := findKey(storePath, user, host)
|
pemData, err := findKey(storePath, user, host)
|
||||||
if err != nil {
|
if err == nil {
|
||||||
fmt.Println("Error:", err)
|
|
||||||
os.Exit(1)
|
|
||||||
}
|
|
||||||
|
|
||||||
targetName := host
|
targetName := host
|
||||||
if user != "" {
|
if user != "" {
|
||||||
targetName = user + "@" + host
|
targetName = user + "@" + host
|
||||||
|
|
@ -110,6 +106,7 @@ func startSSH(storePath string, args []string) {
|
||||||
}
|
}
|
||||||
env = newEnv
|
env = newEnv
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
sshPath, err := exec.LookPath("ssh")
|
sshPath, err := exec.LookPath("ssh")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue