Package org.eclipse.jgit.lib
Class GpgConfig
java.lang.Object
org.eclipse.jgit.lib.GpgConfig
Typed access to GPG related configuration options.
- Since:
- 5.2
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final boolean
private final GpgConfig.GpgFormat
private final String
private final boolean
private final boolean
private final String
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieves the config value of gpg.format.Retrieves the value of the configured GPG program to use, as defined by gpg.openpgp.program, gpg.x509.program (depending on the definedformat
), or gpg.program.Retrieves the config value of user.signingKey.boolean
Retrieves the value of git configtag.gpgSign
.boolean
Retrieves the value of git configtag.forceSignAnnotated
.boolean
Retrieves the config value of commit.gpgSign.
-
Field Details
-
keyFormat
-
signingKey
-
program
-
signCommits
private final boolean signCommits -
signAllTags
private final boolean signAllTags -
forceAnnotated
private final boolean forceAnnotated
-
-
Constructor Details
-
GpgConfig
Create aGpgConfig
with the given parameters and defaulttrue
for signing commits andfalse
for tags.- Parameters:
keySpec
- to useformat
- to usegpgProgram
- to use- Since:
- 5.11
-
GpgConfig
Create a new GPG config that reads the configuration from config.- Parameters:
config
- the config to read from
-
-
Method Details
-
getKeyFormat
Retrieves the config value of gpg.format.- Returns:
- the
GpgConfig.GpgFormat
-
getProgram
Retrieves the value of the configured GPG program to use, as defined by gpg.openpgp.program, gpg.x509.program (depending on the definedformat
), or gpg.program.- Returns:
- the program string configured, or
null
if none - Since:
- 5.11
-
getSigningKey
Retrieves the config value of user.signingKey.- Returns:
- the value of user.signingKey (may be
null
)
-
isSignCommits
public boolean isSignCommits()Retrieves the config value of commit.gpgSign.- Returns:
- the value of commit.gpgSign (defaults to
false
)
-
isSignAllTags
public boolean isSignAllTags()Retrieves the value of git configtag.gpgSign
.- Returns:
- the value of
tag.gpgSign
; by defaultfalse
- Since:
- 5.11
-
isSignAnnotated
public boolean isSignAnnotated()Retrieves the value of git configtag.forceSignAnnotated
.- Returns:
- the value of
tag.forceSignAnnotated
; by defaultfalse
- Since:
- 5.11
-