Class GpgConfig

java.lang.Object
org.eclipse.jgit.lib.GpgConfig

public class GpgConfig extends Object
Typed access to GPG related configuration options.
Since:
5.2
  • Constructor Details

    • GpgConfig

      public GpgConfig(Config config)
      Create a new GPG config that reads the configuration from config.
      Parameters:
      config - the config to read from
  • Method Details

    • getKeyFormat

      public GpgConfig.GpgFormat getKeyFormat()
      Retrieves the config value of gpg.format.
      Returns:
      the GpgConfig.GpgFormat
    • getProgram

      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:
      the program string configured, or null if none
      Since:
      5.11
    • getSigningKey

      public String 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 config tag.gpgSign.
      Returns:
      the value of tag.gpgSign; by default false
      Since:
      5.11
    • isSignAnnotated

      public boolean isSignAnnotated()
      Retrieves the value of git config tag.forceSignAnnotated.
      Returns:
      the value of tag.forceSignAnnotated; by default false
      Since:
      5.11
    • getSshDefaultKeyCommand

      public String getSshDefaultKeyCommand()
      Retrieves the value of git config gpg.ssh.defaultKeyCommand.
      Returns:
      the value of gpg.ssh.defaultKeyCommand
      Since:
      7.1
    • getSshAllowedSignersFile

      public String getSshAllowedSignersFile()
      Retrieves the value of git config gpg.ssh.allowedSignersFile.
      Returns:
      the value of gpg.ssh.allowedSignersFile
      Since:
      7.1
    • getSshRevocationFile

      public String getSshRevocationFile()
      Retrieves the value of git config gpg.ssh.revocationFile.
      Returns:
      the value of gpg.ssh.revocationFile
      Since:
      7.1