Skip to content

Retry SSH without SSH_AUTH_SOCK #9678

@kaovilai

Description

@kaovilai

On darwin, this is set by default.. may be wise to retry without inheriting this env on darwin on all ssh ops such as gather bootstrap.

func getAgent(keys []string) (agent.Agent, string, error) {
// Attempt to use the existing SSH agent if it's configured or use the default ssh pair generated.
if authSock := os.Getenv("SSH_AUTH_SOCK"); authSock != "" {
logrus.Debugf("Using SSH_AUTH_SOCK %s to connect to an existing agent", authSock)
if conn, err := net.Dial("unix", authSock); err == nil {
return agent.NewClient(conn), "agent", nil
}
}
return newAgent(keys)
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    lifecycle/frozenIndicates that an issue or PR should not be auto-closed due to staleness.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions