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:- Create an empty file on your server's binary directory (where
gitserver.confis located).plasticd.exe - Restart the UVCS server. It starts listening on the GitHub protocol default port: 9418.
This command pushes your GitHub repository to the Plastic repository named default.git push --all git://localhost/default
gitserver.conf
file
The gitserver.confgitserver.conf# 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:
-
Add the following entry to your file to configure HTTP authentication:
gitserver.conf# http authenticationhttp.basicauth=true -
Add the following entry to your file to configure GitServer to listen in the HTTP protocol:
gitserver.conf# http authenticationhttp.port=8080http.basicauth=true