gpg

package
v1.7.0-beta.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: MPL-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectAgentSocketPath

func DetectAgentSocketPath() (string, error)

DetectAgentSocketPath returns the host gpg-agent extra socket path, used to reverse-forward the agent into a workspace.

func ForwardAgent

func ForwardAgent(client client2.BaseWorkspaceClient) error

ForwardAgent starts a background SSH connection that forwards the local GPG agent.

func GetHostOwnerTrust

func GetHostOwnerTrust() ([]byte, error)

func GetHostPubKey

func GetHostPubKey() ([]byte, error)

func IsGpgTunnelRunning

func IsGpgTunnelRunning(
	ctx context.Context,
	user string,
	client *ssh.Client,
) bool

func SigningKey

func SigningKey(ctx context.Context) string

SigningKey returns the user's GPG signing key from git config, or "" when no key is configured or the signing format is SSH (SSH signing keys are handled by the separate SSH signature helper).

Types

type GPGConf

type GPGConf struct {
	PublicKey  []byte
	OwnerTrust []byte
	SocketPath string
	GitKey     string
}

func (*GPGConf) ImportGpgKey

func (g *GPGConf) ImportGpgKey() error

func (*GPGConf) ImportOwnerTrust

func (g *GPGConf) ImportOwnerTrust() error

func (*GPGConf) SetupGpgConf

func (g *GPGConf) SetupGpgConf() error

func (*GPGConf) SetupRemoteSocketDirTree

func (g *GPGConf) SetupRemoteSocketDirTree() error
func (g *GPGConf) SetupRemoteSocketLink() error

This function will normalize the location of the forwarded socket. the forwarding that happens in pkg/ssh/forward.go will forward the socket in the same path (eg. /Users/foo/.gnupg/S.gpg-agent) This function will use hardlinks to normalize it to where linux usually expects the socket to be.

func (*GPGConf) StopGpgAgent

func (g *GPGConf) StopGpgAgent() error

Jump to

Keyboard shortcuts

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