LinkedIn Sourceforge

Vincent's Blog

Pleasure in the job puts perfection in the work (Aristote)

How I add a new project on my got server

Posted on 2026-02-19 20:12:00 from Vincent in got

This post explains how to create a repository on a development machine, publish it on a gotd server, and configure access permissions. By the end, you will have a fully functional workflow for cloning, developing, and sending changes to your own hosted repository.


Photo by AbsolutVision on Unsplash

Creating and Publishing a Game of Trees Repository on a gotd Server

Game of Trees (Got) provides a secure, simple, and audit-friendly version control system designed with OpenBSD principles in mind. When combined with gotd, it allows you to host repositories over SSH with fine-grained access control — without the complexity of Git hosting platforms.

This post walks through the complete process of:

  • Creating a repository on a development machine
  • Uploading it to a server running gotd
  • Configuring access permissions
  • Cloning and working with the repository

Prerequisites

Before starting, ensure:

  • got is installed on your development machine
  • gotd is installed and running on the server
  • SSH access to the server is configured
  • A system user for gotd (typically _gotd) exists
  • Optional: an anonymous user account if you plan public read access

1. Create a Repository on the Development PC

First, create an empty Got repository.

got init myrepo.git

Now import your existing project files and create the initial commit:

got import -m "initial import" -r ./myrepo.git /path/to/my/code

At this point, you have a complete local repository ready to be published.

2. Transfer the Repository to the Server

Send the repository directory to the server using rsync (recommended for preserving permissions and efficiency):

rsync -av ./myrepo.git mysuer@myserver:/tmp

The repository on this dev PC can be removed.

rm -fr ./myrepo.git

3. Install the Repository on the Server

Move the repository to its final location:

mv /tmp/myrepo.git /path/to/repos

Set ownership so gotd can manage it and restrict permissions for security:

chown -R _gotd:_gotd /path/to/repos/myrepo.git
chmod -R 750 /path/to/repos/myrepo.git

4. Configure gotd Access

Edit the gotd configuration file:

vi /etc/gotd.conf

Add a repository definition:

repository "myrepo" {
    path "/path/to/repos/myrepo.git"
    permit ro anon
    permit rw <myuser>
}
  • repository "myrepo" — Public name used in clone URLs
  • path — Filesystem path to the repository
  • permit ro anon — Anonymous read-only access as created in this post
  • permit rw — Read/write access for a specific user

Replace <myuser> with your actual SSH username.

If you do not want public access, simply remove the anon line.

5. Apply the Configuration

Restart gotd to load the new repository:

rcctl restart gotd

6. Add Repository Metadata for gotwebd

Game of Trees repositories can include helpful descriptive files used by the gotwebd fastcgi service.

Edit the following files inside the repository directory:

vi /path/to/repos/myrepo.git/description

Provide a short summary of the project.

vi /path/to/repos/myrepo.git/cloneurl

For example:

ssh://myuser@server.example.com/myrepo

Owner Information

vi /path/to/repos/myrepo.git/owner

Add the maintainer or organization name.

7. Clone the Repository from a Client Machine

On the orginal or any development machine:

cd ~/got/
got clone ssh://<myuser>@<server name>/myrepo

The repository will be cloned into ~/got/myrepo.git.

8. Check Out a Working Tree

Create a working copy for development:

cd ~/dev/
got checkout ~/got/myrepo.git

You can now modify files and use standard Got commands.

9. Daily Development Workflow

Typical commands include:

got add <file>
got commit -m "Describe your changes"

When ready to publish changes to the server:

got send

10. Permissions and Sending Changes

The got send command succeeds only if your user has write permission in gotd.conf:

permit rw <myuser>

If you only have read-only access, sending changes will be rejected.

Conclusion

Hosting your own Got repository with gotd provides a lightweight, secure alternative to traditional Git hosting platforms. The workflow is straightforward:

  1. Create and populate a repository locally
  2. Transfer it to the server
  3. Configure access in gotd
  4. Clone and develop normally
  5. Publish changes using got send

With minimal infrastructure and strong security defaults, this setup is ideal for self-hosted development environments, OpenBSD systems, and users who value simplicity and control.



0, 0
displayed: 42



What is the second letter of the word Moon?