Documentation

Support

Unity Version Control

Configure GitServer

Set up Gitserver to work with your Unity Version Control server.
Read time 2 minutesLast updated 21 days ago

Enable GitServer so that you can push and pull from GitHub to Unity Version Control (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:
  1. Create an empty
    gitserver.conf
    file on your server's binary directory (where
    plasticd.exe
    is located).
  2. 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/default
This 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 configurationtcp.port=9418http.port=80# mapping storage - the mappings between GitHub and UVCS objects# the default path is automatically generated by the serverstorage.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 hereexport.repo=codeexport.repo=quakeexport.repo=robotcode

Configure 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\user

Configure 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. To set up HTTP authentication so that it works with GitServer:
  1. Add the following entry to your
    gitserver.conf
    file to configure HTTP authentication:
    # http authenticationhttp.basicauth=true
  2. Add the following entry to your
    gitserver.conf
    file to configure GitServer to listen in the HTTP protocol:
    # http authenticationhttp.port=8080http.basicauth=true