Configure the Git Connector
-
As
root
, run the following configuration script in interactive mode:$ sudo /opt/perforce/git-connector/bin/configure-git-connector.sh
In interactive mode, the configuration script displays the following summary of settings. Some settings have a default value. Other settings require that you specify a value during the configuration.
- Helix Core Server
P4PORT: The host (name or IP address) and port for the
Helix Core Server:
host:port
or, if the server is using a protocol:protocol:host:port
whereprotocol
represents one of the protocols listed forP4PORT
. - Helix Core Server
super-user: The name of an existing
Helix Core Server
user with
super
level privileges. This super-user is used for all tasks related to the Helix Core Server, such as creating users and groups and granting permissions. - Helix Core Server super-user password: The password for the existing Helix Core Server super-user.
- mindiskspace - the minimum amount of gigabytes available in the repos directory of the gconn machine. Otherwise gconn pushes and fetches do not run. Default is 10. Changing the value can be done at initial installation or later for reconfiguration. For example,
$ sudo /opt/perforce/git-connector/bin/configure-git-connector.sh --mindiskspace = 40 -
New Graph Depot name: The Helix Core Server installation automatically creates a default depot of type
graph
namedrepo
. During the configuration, you can create an additional graph depot.A depot of type
graph
is a container for Git repos.A depot name must start with a letter or a number.
-
GitConnector user password: By default, the Git Connector configuration creates a Helix Core Server user named
gconn-user
. This user performs the Helix Core Server requests. Only admins should know and set this password.TipWhen you run the configuration script, you can:
-
specify the name of a Helix Core user that already exists, which avoids consuming a license for a new user
-
specify a different name to create a new Helix Core user with that name
-
accept the default name of gconn-user to create a new Helix Core user named gconn-user, which is the name we use in this document
The user type must be standard, not operator. See Types of users in the Helix Core Command-Line (P4) Reference.
NoteIf you change the
gconn-user
Helix Core Server password, you need to reset the password on each Git Connector by running the helper script:/opt/perforce/git-connector/bin/login-gconn-user.sh
. -
- Configure HTTPS?: Option to use HTTPS as authentication
method. HTTPS is required if you use Git LFS.Tip
Re-running
configure-git-connector.sh
and choosingNo
when asked if you want to configure HTTPS after having chosenYes
previously, does not change already configured https. - Configure SSH?: Option to use SSH as authentication method.
- GitConnector SSH system user: The name of the SSH system
user to connect to the Git Connector. By default, this is
git
. - Home directory for SSH system user: The home directory for
the SSH system user. By default, this is
/home/git
. - SSH key update interval: How often the SSH keys are updated. Tip
Wait 10 minutes for the keys to update. Otherwise, the Git Connector will not have the updated SSH keys in the list of authorized keys, and you will not be able to connect.
- Server ID: The host name of the server.
- Helix Core Server
P4PORT: The host (name or IP address) and port for the
Helix Core Server:
-
Provide information to the configuration script.
After the summary, the configuration script prompts you for information on the Helix Core Server
P4PORT
, the Helix Core Server super-user’s name and password, whether you want to create another depot of type graph, and whether you want to configure HTTPS or SSH.At each prompt, you can accept the proposed default value by pressing Enter, or you can specify your own value. If needed, you can also set values with a command line argument. For example, to specify
P4PORT
and a super-user name:$ sudo /opt/perforce/git-connector/bin/configure-git-connector.sh --p4port=ssl:IP address:1666 --super=name
After you answer the prompts, the script creates the configuration file according to your choices. As it runs, the script displays information about the configurations taking place. The script might prompt you for more input. For example, if you opted for HTTPS support and Apache components are already present on your server.
To see all possible configuration options, run the command:
$ sudo /opt/perforce/git-connector/bin/configure-git-connector.sh --help
This is helpful if you do not want to use the default configurations. For example, the configuration script does not prompt you for the name of the SSH user or the path to the home directory of the system user because it uses default values. If you want to overwrite these values, you need to pass in the respective parameter and argument.
- When the configuration script has finished running, read the details to see if anything still needs to be done.
The first import of an external Git repo creates (or does the initial population of) the repo. Any subsequent imports (or mirroring) append new commits to the repo.
The dm.repo.unpack configurable controls the retaining or unpacking of Git packfiles into loose objects when Git Connector imports the contents of an external Git repo into a Helix Core graph depot.
The default behavior is to complete the import quickly, and later wait for individual file unpacking as needed during sync, diff, etc.
If you know you have big packfiles with many objects, and after import you will sync a subset of the files in the packfile, the default behavior is appropriate.
If you will sync all files, make 2 the value of the configurable.