Top Description Inners Fields Constructors Methods
org.eclipse.jgit.lib

public Class GpgConfig

extends Object
Class Inheritance

Typed access to GPG related configuration options.
Since
5.2

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static enum
GpgConfig.GpgFormat

Config values for gpg.format.

Field Summary

Modifier and TypeField and Description
private final boolean
private final GpgConfig.GpgFormat
private final String
private final boolean
private final boolean
private final String
private final String
private final String
private final String

Constructor Summary

AccessConstructor and Description
public
GpgConfig(Config
the config to read from
config
)

Create a new GPG config that reads the configuration from config.

Method Summary

Modifier and TypeMethod and Description
public GpgConfig.GpgFormat
getKeyFormat()

Retrieves the config value of gpg.format.

public String

Returns:

the program string configured, or null if none
getProgram
()

Retrieves the value of the configured GPG program to use, as defined by gpg.openpgp.program, gpg.x509.program (depending on the defined format), or gpg.program.

public String

Returns:

the value of user.signingKey (may be null)
getSigningKey
()

Retrieves the config value of user.signingKey.

public String

Returns:

the value of gpg.ssh.allowedSignersFile
getSshAllowedSignersFile
()

Retrieves the value of git config gpg.ssh.allowedSignersFile.

public String

Returns:

the value of gpg.ssh.defaultKeyCommand
getSshDefaultKeyCommand
()

Retrieves the value of git config gpg.ssh.defaultKeyCommand.

public String

Returns:

the value of gpg.ssh.revocationFile
getSshRevocationFile
()

Retrieves the value of git config gpg.ssh.revocationFile.

public boolean

Returns:

the value of tag.gpgSign; by default false
isSignAllTags
()

Retrieves the value of git config tag.gpgSign.

public boolean

Returns:

the value of tag.forceSignAnnotated; by default false
isSignAnnotated
()

Retrieves the value of git config tag.forceSignAnnotated.

public boolean

Returns:

the value of commit.gpgSign (defaults to false)
isSignCommits
()

Retrieves the config value of commit.gpgSign.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

forceAnnotatedback to summary
private final boolean forceAnnotated
keyFormatback to summary
private final GpgConfig.GpgFormat keyFormat
programback to summary
private final String program
signAllTagsback to summary
private final boolean signAllTags
signCommitsback to summary
private final boolean signCommits
signingKeyback to summary
private final String signingKey
sshAllowedSignersFileback to summary
private final String sshAllowedSignersFile
sshDefaultKeyCommandback to summary
private final String sshDefaultKeyCommand
sshRevocationFileback to summary
private final String sshRevocationFile

Constructor Detail

GpgConfigback to summary
public GpgConfig(Config config)

Create a new GPG config that reads the configuration from config.

Parameters
config:Config

the config to read from

Method Detail

getKeyFormatback to summary
public GpgConfig.GpgFormat getKeyFormat()

Retrieves the config value of gpg.format.

Returns:GpgConfig.GpgFormat

the org.eclipse.jgit.lib.GpgConfig.GpgFormat

getProgramback to summary
public String getProgram()

Retrieves the value of the configured GPG program to use, as defined by gpg.openpgp.program, gpg.x509.program (depending on the defined format), or gpg.program.

Returns:String

the program string configured, or null if none

Since
5.11
getSigningKeyback to summary
public String getSigningKey()

Retrieves the config value of user.signingKey.

Returns:String

the value of user.signingKey (may be null)

getSshAllowedSignersFileback to summary
public String getSshAllowedSignersFile()

Retrieves the value of git config gpg.ssh.allowedSignersFile.

Returns:String

the value of gpg.ssh.allowedSignersFile

Since
7.1
getSshDefaultKeyCommandback to summary
public String getSshDefaultKeyCommand()

Retrieves the value of git config gpg.ssh.defaultKeyCommand.

Returns:String

the value of gpg.ssh.defaultKeyCommand

Since
7.1
getSshRevocationFileback to summary
public String getSshRevocationFile()

Retrieves the value of git config gpg.ssh.revocationFile.

Returns:String

the value of gpg.ssh.revocationFile

Since
7.1
isSignAllTagsback to summary
public boolean isSignAllTags()

Retrieves the value of git config tag.gpgSign.

Returns:boolean

the value of tag.gpgSign; by default false

Since
5.11
isSignAnnotatedback to summary
public boolean isSignAnnotated()

Retrieves the value of git config tag.forceSignAnnotated.

Returns:boolean

the value of tag.forceSignAnnotated; by default false

Since
5.11
isSignCommitsback to summary
public boolean isSignCommits()

Retrieves the config value of commit.gpgSign.

Returns:boolean

the value of commit.gpgSign (defaults to false)

org.eclipse.jgit.lib back to summary

public final Enum GpgConfig.GpgFormat

extends Enum<GpgConfig.GpgFormat>
implements ConfigEnum
Class Inheritance
All Implemented Interfaces
org.eclipse.jgit.lib.Config.ConfigEnum

Config values for gpg.format.

Field Summary

Modifier and TypeField and Description
private final String
public static final GpgConfig.GpgFormat
OPENPGP

Value for openpgp

public static final GpgConfig.GpgFormat
SSH

Value for ssh.

public static final GpgConfig.GpgFormat
X509

Value for x509

Constructor Summary

AccessConstructor and Description
private
GpgFormat(String configValue)

Method Summary

Modifier and TypeMethod and Description
public boolean
matchConfigValue(String
the string to match
s
)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

public String
toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

public static GpgConfig.GpgFormat
public static GpgConfig.GpgFormat[]
Inherited from java.lang.Enum:
clonecompareTodescribeConstableequalsfinalizegetDeclaringClasshashCodenameordinaltoStringvalueOf

Field Detail

configValueback to summary
private final String configValue
OPENPGPback to summary
public static final GpgConfig.GpgFormat OPENPGP

Value for openpgp

SSHback to summary
public static final GpgConfig.GpgFormat SSH

Value for ssh.

Since
7.0
X509back to summary
public static final GpgConfig.GpgFormat X509

Value for x509

Constructor Detail

GpgFormatback to summary
private GpgFormat(String configValue)

Method Detail

matchConfigValueback to summary
public boolean matchConfigValue(String s)

Implements org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.matchConfigValue.

Checks if the given string matches with enum value.

Parameters
s:String

the string to match

Returns:boolean

true if the given string matches enum value, false otherwise

Annotations
@Override
toConfigValueback to summary
public String toConfigValue()

Implements org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Doc from org.eclipse.jgit.lib.Config.ConfigEnum.toConfigValue.

Converts enumeration value into a string to be save in config.

Returns:String

the enum value as config string

Annotations
@Override
valueOfback to summary
public static GpgConfig.GpgFormat valueOf(String name)
valuesback to summary
public static GpgConfig.GpgFormat[] values()