gpg

package
v1.11.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const ContainerSocketPath = "/tmp/S.gpg-agent"

ContainerSocketPath is the container-local path the host gpg-agent socket is forwarded to; any workspace user can reach it.

Variables

This section is empty.

Functions

func DetectAgentSocketPath added in v1.10.0

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(ctx context.Context, client client2.BaseWorkspaceClient) error

ForwardAgent starts a supervised background SSH connection that forwards the local GPG agent, restarting it until ctx is cancelled.

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 SetupGpgConf added in v1.11.0

func SetupGpgConf() error

func SigningKey added in v1.10.0

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).

func StopGpgAgent added in v1.11.0

func StopGpgAgent() error

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) SetupRemoteSocketDirTree

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

Jump to

Keyboard shortcuts

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