public class GpgConfig extends Object
Modifier and Type | Class and Description |
---|---|
static class |
GpgConfig.GpgFormat
Config values for gpg.format.
|
Constructor and Description |
---|
GpgConfig(Config config)
Create a new GPG config that reads the configuration from config.
|
GpgConfig(String keySpec,
GpgConfig.GpgFormat format,
String gpgProgram)
Create a
GpgConfig with the given parameters and default
true for signing commits and false for tags. |
Modifier and Type | Method and Description |
---|---|
GpgConfig.GpgFormat |
getKeyFormat()
Retrieves the config value of gpg.format.
|
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. |
String |
getSigningKey()
Retrieves the config value of user.signingKey.
|
boolean |
isSignAllTags()
Retrieves the value of git config
tag.gpgSign . |
boolean |
isSignAnnotated()
Retrieves the value of git config
tag.forceSignAnnotated . |
boolean |
isSignCommits()
Retrieves the config value of commit.gpgSign.
|
public GpgConfig(String keySpec, GpgConfig.GpgFormat format, String gpgProgram)
GpgConfig
with the given parameters and default
true
for signing commits and false
for tags.keySpec
- to useformat
- to usegpgProgram
- to usepublic GpgConfig(Config config)
config
- the config to read frompublic GpgConfig.GpgFormat getKeyFormat()
GpgConfig.GpgFormat
public String getProgram()
format
), or gpg.program.null
if nonepublic String getSigningKey()
null
)public boolean isSignCommits()
false
)public boolean isSignAllTags()
tag.gpgSign
.tag.gpgSign
; by default false
public boolean isSignAnnotated()
tag.forceSignAnnotated
.tag.forceSignAnnotated
; by default
false
Copyright © 2021 Eclipse JGit Project. All rights reserved.