sign

package
v0.108.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCommitSignKey

func GetCommitSignKey(armoredKeyRing string, keyPassphrase string) (*openpgp.Entity, error)

GetCommitSignKey returns the gpg key used to sign the commit message

func SignCommit added in v0.108.0

func SignCommit(commit *object.Commit, signer *openpgp.Entity) (*object.Commit, error)

SignCommit signs a git commit object using the provided GPG key

func ValidateGPGKey added in v0.108.0

func ValidateGPGKey(armoredKeyRing, passphrase string) error

ValidateGPGKey validates that the GPG key can be used for signing

Types

type GPGSpec

type GPGSpec struct {
	/*
		signingKey defines the gpg key used to sign the commit message

		default:
			none
	*/
	SigningKey string `yaml:",omitempty"`
	/*
		passphrase defines the gpg passphrase used to sign the commit message
	*/
	Passphrase string `yaml:",omitempty"`
}

GPGSpec defines the specification for manipulating gpg keys in the context of git commits.

Jump to

Keyboard shortcuts

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