ssh

package
v0.0.0-...-66e1e6f Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Feb 16, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDefaultKeys

func AddDefaultKeys() error

AddDefaultKeys adds RSA or DSA identities to the authentication agent, ssh-agent(1) located unfder ~/.ssh. It adds the files ~/.ssh/id_rsa, ~/.ssh/id_dsa , ~/.ssh/id_ecdsa and ~/.ssh/identity. If any file requires a passphrase, ssh-add asks for the passphrase from the user. In test automation, ssh keys with passphrase should be abstained. Also, a ssh-agent must be running and the SSH_AUTH_SOCK environment variable must contain the name of its socket for ssh-add to work.

func Check

func Check(url string) error

Check checks if a git-import URL is running under environment where it will most likely to succee

func RunInUnixShell

func RunInUnixShell() bool

RunInUnixShell determines if git-import is being run in a unix shell environment or not Note: valid shell environments are:

MacOS, Linux, Git Bash, Cygwin, MingX, WSL

Types

type AgentClient

type AgentClient struct {
	// contains filtered or unexported fields
}

AgentClient wraps an instance of agent.Agent

func NewAgentClient

func NewAgentClient() (*AgentClient, error)

NewAgentClient wrapps a new agent client that uses a unix socket specified by environment variable SSH_AUTH_SOCK

func (*AgentClient) Close

func (ag *AgentClient) Close() error

Close - attempts to close this client

func (*AgentClient) HasKeys

func (ag *AgentClient) HasKeys() bool

HasKeys checks if an ssh-agent has any keys registered with it or not

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL