MCPcopy Index your code
hub / github.com/coder/coder / forwardGPGAgent

Function forwardGPGAgent

cli/ssh_other.go:27–48  ·  view source on GitHub ↗
(ctx context.Context, stderr io.Writer, sshClient *gossh.Client)

Source from the content-addressed store, hash-verified

25}
26
27func forwardGPGAgent(ctx context.Context, stderr io.Writer, sshClient *gossh.Client) (io.Closer, error) {
28 localSocket, err := localGPGExtraSocket(ctx)
29 if err != nil {
30 return nil, err
31 }
32
33 remoteSocket, err := remoteGPGAgentSocket(sshClient)
34 if err != nil {
35 return nil, err
36 }
37
38 localAddr := &net.UnixAddr{
39 Name: localSocket,
40 Net: "unix",
41 }
42 remoteAddr := &net.UnixAddr{
43 Name: remoteSocket,
44 Net: "unix",
45 }
46
47 return sshRemoteForward(ctx, stderr, sshClient, localAddr, remoteAddr)
48}

Callers 1

sshMethod · 0.70

Calls 3

localGPGExtraSocketFunction · 0.85
remoteGPGAgentSocketFunction · 0.85
sshRemoteForwardFunction · 0.85

Tested by

no test coverage detected