The gitcentric config_repo command enables you to configure Git repositories for use with GitCentric.


gitcentric config-repo [--server <server>:<port>] [--noNotify] [--clear]
[--useAccuworkKey | --useThirdPartyKey] [--cpkPattern <regex>]
[--user <user>] [--pw <password>][--help] [--children-of <reponame>]
[<reponame>...] [--]

Specify one or more repositories to configure with <reponame>....

You can use the --useAccuworkKey or --useThirdPartyKey options to configure a repo for an AccuRev Server that uses either AccuWork or a third-party issue tracking system. For more information, see Enable and Use Change Packages.

If your site does use change packages, the --cpkPattern option can be used to specify a regular expression setting that determines what your users need to put in their Git commit comments so that AccuRev knows what issue the change applies to. A discussion of Java regular expressions is beyond the scope of this document, but here is an example:


This format would be adequate for simple environments where the comment

always starts with Resolved, followed by white space, followed by any number of issues, separated by commas:
Resolved 12576 
Resolved 34, 149, 11057, 686
Note: White space in regular expressions (and any other GitCentric CLI argument) needs to be quoted (see Spaces and Quoting), and special characters may require escape characters or quoting. For example, for the above regular expression to be passed correctly from the command line, you would need to construct the option as follows:
 --cpkPattern "Resolved'\'s+['\'d,]+)"

Use a search engine and search for “Java regular expressions” for more information about these formats.


--children-of <reponame>
Configure all the children of the specified parent repo.
Clear out all GitCentric configuration for this repository, including all branch configuration.
--cpkPattern, -c <regex>
Specify an AccuRev change package regular expression that determines what your users need to put in their Commit comments so that AccuRev knows what issue the change applies to.
--help, -h
Display the help for this command.
Do not notify the GitCentric bridge of the configuration change. This is useful if you are making a series of configuration changes and do not want to reconfigure the bridge until they are all done. You do this by omitting --noNotify on the last command. If you forget to omit --noNotify on the last command, you can force the commit by either executing a config-repo or config-branch command, or by restarting the bridge (such as through the Tomcat web server admin console).
--pw, -p <password>
The AccuRev login password for <user>. If omitted then an empty password is used to log in to AccuRev.
--server, -S <server>:<port>
Specify the IP address and the port to the AccuRev server that this repository is mapped to.
--useAccuworkKey, -a, --useThirdPartyKey, -3,
Use AccuWork issue numbers for change packages, or use third party ITS keys instead of AccuWork issue numbers for change packages. These options are mutually exclusive.
--user, -u <user>
The AccuRev login account to use for this repository.
End-of-options marker. See Basic Syntax for more details.

Example: Initial configuration

Configure a repo named proj_3000 to be associated with the AccuRev server at myACServer:5050, which uses ASSIGN_PRIVILEGE_USER agc_sync with a password of sync001:

>ssh -p 29418 mylogin@myGCserver gitcentric config-repo proj_3000
-S myACServer:5050 -u agc_sync -p sync001

Example: Maintenance

Change repos proj_3000 and proj_4000, as well as all of the immediate children of parent-only repo remote_parent to a new server (which uses the same ASSIGN_USER_PRIVILEGE user and password).

>ssh -p 29418 mylogin@myGCserver gitcentric config-repo proj_3000 proj_4000
--children-of remote_parent -S myACServer:5050 -u agc_sync -p sync001


Any member of the Project-Owners or Administrators groups.