MCPcopy
hub / github.com/cli/cli / LocalPublicKeys

Method LocalPublicKeys

pkg/ssh/ssh_keys.go:37–44  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

35var ErrKeyAlreadyExists = errors.New("SSH key already exists")
36
37func (c *Context) LocalPublicKeys() ([]string, error) {
38 sshDir, err := c.SshDir()
39 if err != nil {
40 return nil, err
41 }
42
43 return filepath.Glob(filepath.Join(sshDir, "*.pub"))
44}
45
46func (c *Context) HasKeygen() bool {
47 _, err := c.findKeygen()

Callers 3

LoginFunction · 0.80
automaticSSHKeyPairFunction · 0.80
checkAndUpdateOldKeyPairFunction · 0.80

Calls 2

SshDirMethod · 0.95
JoinMethod · 0.80

Tested by

no test coverage detected