HGKeeper has a number of sub commands, but
serve is the most useful one.
setup command is used to bootstrap HGKeeper. It will create the directory
for the repositories as well as the
hgkeeper administration repository.
After initial setup, please make sure to read the
README.md in the
admin repository that was created as it details how access control works.
serve command is the main mode of operation which is to provide access to
You can optionally disable either one of the HGWeb or SSH servers to limit
resource usage or just disable the portions you don't need. However, the HTTP
server will always be active as it contains a health endpoint at
and could be used for integration with OpenSSH Server via the
For example, say you don't need public access or the HGWeb interface at all,
you can disable it by passing
--disable-hgweb to the
serve command or by
HGK_DISABLE_HGWEB environment variable to
Likewise, if you just want to serve up read only repositories over HTTP you can
disable the SSH serve by passing
--disable-ssh to the
serve command or by
HGK_DISABLE_SSH environment variable to
disable-ssh options are mutually exclusive and
passing both will stop HGKeeper from starting.
serve command also has options to tell HGKeeper how it can be accessed
externally. This is useful when integrating with OpenSSH Server. These options
--external-hostname can be a hostname or IP address, but it needs to be an
address that your OpenSSH Server can connect to. Likewise,
is the external port that the OpenSSH Server can reach to connect to HGKeeper's
SSH server. It has a default value of
authorized-keys command is used when integrating with OpenSSH server in
the on demand mode of operation. It takes a single argument as the
SHA256 fingerprint of the SSH public key that OpenSSH will provide. If HGKeeper
knows that key, it will output an
authorized_keys(8) text that OpenSSH Server
can use to continue the HG operation.
once command is used in conjunction with the above mentioned
authorized-keys command for on demand operation. It is the
command that HGKeeper tells OpenSSH Server to run to continue the SSH
operations and is not useful in any other way.