{"id":16666582,"url":"https://github.com/karashiiro/gittlz","last_synced_at":"2026-04-28T23:38:20.998Z","repository":{"id":65115726,"uuid":"581877524","full_name":"karashiiro/gittlz","owner":"karashiiro","description":"A Git server for the laziest of us. Write and test your Git utilities without any hassle.","archived":false,"fork":false,"pushed_at":"2023-05-11T20:41:29.000Z","size":80,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-03T13:31:00.417Z","etag":null,"topics":["ci-cd","docker","git","github-actions","golang","http","integration-testing","server","ssh","test-automation"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"unlicense","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karashiiro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-12-24T17:32:37.000Z","updated_at":"2023-03-05T06:41:09.000Z","dependencies_parsed_at":"2024-12-18T07:34:56.044Z","dependency_job_id":null,"html_url":"https://github.com/karashiiro/gittlz","commit_stats":null,"previous_names":["karashiiro/ditz"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/karashiiro/gittlz","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karashiiro%2Fgittlz","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karashiiro%2Fgittlz/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karashiiro%2Fgittlz/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karashiiro%2Fgittlz/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karashiiro","download_url":"https://codeload.github.com/karashiiro/gittlz/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karashiiro%2Fgittlz/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32404340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-28T19:38:08.556Z","status":"ssl_error","status_checked_at":"2026-04-28T19:37:55.688Z","response_time":56,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ci-cd","docker","git","github-actions","golang","http","integration-testing","server","ssh","test-automation"],"created_at":"2024-10-12T11:11:28.685Z","updated_at":"2026-04-28T23:38:20.974Z","avatar_url":"https://github.com/karashiiro.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Gittlz\n[![GitHub go.mod Go version](https://img.shields.io/github/go-mod/go-version/karashiiro/gittlz)](https://github.com/karashiiro/gittlz/blob/main/go.mod)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/karashiiro/gittlz/build.yml)](https://github.com/karashiiro/gittlz/actions/workflows/build.yml)\n[![GitHub](https://img.shields.io/github/license/karashiiro/gittlz)](https://github.com/karashiiro/gittlz/blob/main/LICENSE)\n[![Docker Image Version (latest semver)](https://img.shields.io/docker/v/karashiiro/gittlz)](https://hub.docker.com/r/karashiiro/gittlz)\n[![Docker Image Size (latest semver)](https://img.shields.io/docker/image-size/karashiiro/gittlz)](https://hub.docker.com/r/karashiiro/gittlz)\n\nA Git server for the laziest of us. Write and test your Git utilities without any hassle.\n\n- [Gittlz](#gittlz)\n  - [Do you need Gittlz?](#do-you-need-gittlz)\n  - [Prerequisites](#prerequisites)\n  - [Usage](#usage)\n  - [Examples](#examples)\n    - [Setting up a cloneable repo over HTTP with basic auth](#setting-up-a-cloneable-repo-over-http-with-basic-auth)\n    - [Using Gittlz in GitHub Actions](#using-gittlz-in-github-actions)\n  - [Authentication](#authentication)\n    - [SSH password authentication](#ssh-password-authentication)\n    - [SSH key authentication](#ssh-key-authentication)\n    - [HTTP URL authentication](#http-url-authentication)\n    - [HTTP basic authentication](#http-basic-authentication)\n  - [Containerless](#containerless)\n  - [Architecture](#architecture)\n\n## Do you need Gittlz?\nIf all you need is a no-auth Git *remote* (not necessarily a server), consider trying Git's\n[Local protocol](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols#_local_protocol) first.\n\nGittlz is meant to work in place of a live Git host for development purposes, and not to act as a\nproduction server in any form. If that's what you were looking for, try [Gitea](https://gitea.io/en-us/),\n[Gogs](https://gogs.io), [OneDev](https://github.com/theonedev/onedev), or\n[Soft Serve](https://github.com/charmbracelet/soft-serve), among the many projects floating around.\n\nThis will likely be repeated several times throughout this documentation:\n*Do not use Gittlz as a production Git server.*\n\n## Prerequisites\nHave the following software installed before using Gittlz:\n\n- Docker (to run the container)\n- Go v1.19+ (to build/install the CLI)\n\n## Usage\nGittlz requires no configuration by default - just point a Git client at it and get started:\n\n```sh\ndocker run --rm -it -p 6177:6177 -p 9418:9418 karashiiro/gittlz:latest\n```\n\nIf you want to use a persistent directory for repositories, mount it to `/srv/git`:\n\n```sh\ndocker run --rm -it -v /path/to/repos:/srv/git:rw -p 6177:6177 -p 9418:9418 karashiiro/gittlz:latest\n```\n\nRepositories should be [bare repositories](https://git-scm.com/book/en/v2/Git-on-the-Server-Getting-Git-on-a-Server)\non the server. The Gittlz CLI abstracts away this setup process:\n\n```sh\nCGO_ENABLED=0 go install github.com/karashiiro/gittlz@v0.3.0\ngittlz create-repo repo\n```\n\nThen, you can clone repositories from a Git client outside the container:\n\n```sh\ngit clone git://localhost/repo.git\n```\n\nAnd that's it! Enjoy your Gittlz.\n\nThe Gittlz [Docker image](https://hub.docker.com/repository/docker/karashiiro/gittlz) makes this setup process\nnearly as simple as it can be. The image is based on Alpine Linux, but it includes a full Git installation, which\ncan be used to manually perform operations inside the container. `sh` is available as a basic shell for manual\nrepository setup, if needed.\n\n## Examples\nThese are some common workflows using Gittlz, provided with minimal commentary and as few assumptions as possible.\nThese examples use Git Bash, and may need to be adjusted to work in other shells. The Gittlz CLI is assumed to be\ninstalled before running these examples.\n\n### Setting up a cloneable repo over HTTP with basic auth\n```bash\n# Create the Gittlz instance with non-persistent data, and detach it from the shell\ndocker run --rm -it -d --name=gittlz -p 6177:6177 -p 80:80 karashiiro/gittlz:latest gittlz serve --protocol=http --username=gitt --password=lz\n# Create a repository on the server called \"example.git\"\ngittlz create-repo example\n# Base64-encode the username:password pair\necho -n \"gitt:lz\" | base64 # Z2l0dDpseg==\n# Clone the repository\ngit -c http.extraHeader=\"Authorization: Basic Z2l0dDpseg==\" clone http://localhost:80/example.git\n# (Optional) Delete the Gittlz instance, and all of the data on it\ndocker kill gittlz\n```\n\n### Using Gittlz in GitHub Actions\nAn example workflow file is available [here](.github/workflows/example.yml). Gittlz can be used via\n[service containers](https://docs.github.com/en/actions/using-containerized-services/about-service-containers) on\nLinux runners. Using Gittlz on other runners requires [containerless](#containerless) setup.\n\n## Authentication\nGittlz comes preconfigured with no authentication whatsoever. All of the optional authentication methods provided\nare intentionally insecure - Gittlz favors convenience over security where possible.\n\n*Do not use Gittlz as a production Git server.*\n\nThe following forms of authentication are configurable:\n\n* SSH password authentication\n* SSH key authentication\n* HTTP URL authentication\n* HTTP basic authentication\n\nThis covers the majority of authentication schemes used by Git hosting providers.\n\n### SSH password authentication\nStart the server with a command override, replacing the port mapping and password options as needed:\n\n```sh\ndocker run --rm -it -p 6177:6177 -p 22:22 karashiiro/gittlz:latest gittlz serve --protocol=ssh --password=password\n```\n\nThen, clone repositories by providing the password interactively:\n\n```sh\ngit clone ssh://localhost/repo.git\n# Cloning into 'repo'...\n# you@localhost's password: password\n```\n\nIt is not possible to use this authentication method non-interactively.\n\n### SSH key authentication\nNote that Gittlz will not validate the SSH key used to access the server. This is intentional, as key\nconfiguration has little to do with a Git server's public interface. That said, if your use case requires\nSSH key auth failures, open an issue describing your intended workflow.\n\nStart the server with a command override, replacing the port mapping as needed:\n\n```sh\ndocker run --rm -it -p 6177:6177 -p 22:22 karashiiro/gittlz:latest gittlz serve --protocol=ssh\n```\n\nThen, clone repositories with a Git client:\n\n```sh\ngit clone ssh://localhost/repo.git\n```\n\nYou may also want to override your Git client's SSH command to avoid host key verification errors. This\nis done by setting the `GIT_SSH_COMMAND` environment variable, which is shell-specific. In `sh`-like shells,\nthis can simply be prepended to the command:\n\n```sh\nGIT_SSH_COMMAND=\"ssh -o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no\" git clone ssh://localhost/repo.git\n```\n\n### HTTP URL authentication\nSee [HTTP basic authentication](#http-basic-authentication). The same setup applies, but the username and\npassword can be embedded in the URL:\n\n```sh\ngit clone http://gitt:lz@localhost/repo.git\n```\n\nThis authentication scheme is both insecure and deprecated by many clients. Some Git clients will even\nsilently strip the credentials out of the URL. cURL automatically converts it into an `Authorization`\nheader.\n\nBe prepared to debug issues yourself.\n\n### HTTP basic authentication\nStart the server with a command override, replacing the port mapping, username, and password options as needed:\n\n```sh\ndocker run --rm -it -p 6177:6177 -p 80:80 karashiiro/gittlz:latest gittlz serve --protocol=http --username=gitt --password=lz\n```\n\nThen, make sure to base64-encode the username and password somewhere locally. Most operating systems and shells\nhave a means of doing this. In Powershell, for example:\n\n```powershell\n$gittlzAuth = \"gitt:lz\"\n$B64gittlzAuth = [Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes($gittlzAuth))\n```\n\nFinally, add the `http.extraHeader` option to all of your Git commands:\n\n```sh\ngit -c http.extraHeader=\"Authorization: Basic $B64gittlzAuth\" clone http://localhost/repo.git\n```\n\n## Containerless\nThe Gittlz container attempts to abstract configuration as much as possible, without sacrificing\nmaintainability or debuggability. However, Gittlz is also just a CLI application, and can be built\nand run in other environments.\n\nBuilding Gittlz from sources is simple, just disable `cgo` (optional) and install it like any other\nGo application. In `sh`-like shells, this is done as follows:\n\n```sh\nCGO_ENABLED=0 go install github.com/karashiiro/gittlz@v0.3.0\n```\n\nGittlz has runtime dependencies on the standard `git` toolkit and `git-http-backend`. `git-http-backend`\nis a CGI script sometimes offered as part of a separate `git-daemon` package. For Windows users,\n[Git for Windows](https://gitforwindows.org) includes everything needed in a single installer.\n\nRefer to the `--help` commands such as `gittlz --help` and `gittlz serve --help` for configuration\noptions.\n\n## Architecture\nGit's server functionality is mostly usable out of the box, and the official handbook even dedicates\nan entire [chapter](https://git-scm.com/book/en/v2/Git-on-the-Server-The-Protocols) to describing how\nto configure and use it. However, that's more configuration than anyone should want to do if they only\nwant a disposable HTTP or SSH Git server, and don't care about security at all.\n\nWith this being the case, Gittlz is just a very thin wrapper around Git itself, with the exception of\nthe handling for the SSH protocol. Each protocol has a different strategy used to wrap it.\n\n| Protocol | Strategy                                                                                                                                                                                                                                                  |\n| -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| Git      | `git daemon` is launched as a subprocess. That's it.                                                                                                                                                                                                      |\n| HTTP     | [`net/http/cgi`](https://pkg.go.dev/net/http/cgi) (yes, that's part of the Go standard library) is used to interface with `git-http-backend`. Gittlz adds some authentication middleware to simulate a typical managed Git provider.                      |\n| SSH      | [charmbracelet/wish](https://github.com/charmbracelet/wish) is used to set up a simple SSH server in front of Git. Gittlz's implementation is almost an exact copy of Wish's [Git example](https://github.com/charmbracelet/wish/tree/main/examples/git). |\n\nThe [`serve`](https://github.com/karashiiro/gittlz/blob/main/cmd/serve.go) command is used to select\nwhich protocol is used at runtime.\n\nFinally, a control API is put on top for simpler repository creation within the container.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarashiiro%2Fgittlz","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarashiiro%2Fgittlz","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarashiiro%2Fgittlz/lists"}