Configure GitServer
Set up Gitserver to work with your Unity Version Control (UVCS) server.
Enable GitServer so that you can push and pull from GitHub to UVCS. After you enable GitServer, you can edit the configuration file to customize how GitServer works with your repositories. You can also configure your http port on Windows, and set up HTTP authentication for security.
Prerequisites
Quickstart guide
To enable GitServer on your UVCS server:
- Create an empty
gitserver.conffile on your server's binary directory (whereplasticd.exeis located). - Restart the UVCS server. It starts listening on the GitHub protocol default port: 9418.
After you create this file, you can push and pull from GitHub to UVCS as follows:
git push --all git://localhost/defaultThis command pushes your GitHub repository to the Plastic repository named default.
gitserver.conf file
The gitserver.conf file controls the GitServer configuration, and has the following format, where each line is optional:
# port configuration
tcp.port=9418
http.port=80
# mapping storage - the mappings between GitHub and UVCS objects
# the default path is automatically generated by the server
storage.baseDirectory=e:\gitserver\mappings
# mapping interval - how often GitServer looks for new changes
# on the UVCS side to make them available to GitHub
# By default, it is 5 minutes (300 seconds)
mapping.interval=300
# repositories to be exported. By default, all repositories
# will be available on GitServer unless a list is specified here
export.repo=code
export.repo=quake
export.repo=robotcodeConfigure http port on Windows
If you run your UVCS server in a non-admin mode instead of as a Windows service, grant permissions that allow GitServer to use an HTTP port to the user who runs the process. To add the permissions, use the following command:
> netsh http add urlacl url=http://+:80/ user=DOMAIN\userConfigure HTTP authentication
GitServer can use HTTP basic authentication to secure GitHub clients. This means that the GitHub client asks you to enter the username and password when you connect to GitServer. The UVCS server only checks if the user that authenticates has permissions in UVCS to access the specified repository.
Note: To authenticate users, the UVCS needs to be configured in LDAP, AD, or UP security modes so that the GitHub client can enter a valid user and password.
To set up HTTP authentication so that it works with GitServer:
Add the following entry to your
gitserver.conffile to configure HTTP authentication:# http authentication http.basicauth=trueAdd the following entry to your
gitserver.conffile to configure GitServer to listen in the HTTP protocol:# http authentication http.port=8080 http.basicauth=true