a minimalist git server
MIT License
smolgit offers a minimalist git server, making it perfect for small teams or individual developers. Its minimal simple and just works. It's perfect for those who value simplicity and efficiency in their workflow. Small memory footprint, one binary to go.
pull
, push
, clone
and fetch
operations.ssh-keys
to config.yaml
.config.yaml
file with command ./smolgit config > config.yaml
.
yq
for inline changes ./smolgit config | yq '.server.disabled = true' > config.yaml
./smolgit
$> ./smolgit
10:08AM INF set loglevel level=DEBUG
10:08AM INF version version=main-a4f6438
10:08AM INF initialize web server addr=:3080
10:08AM INF initialize ssh server addr=:3081
10:08AM INF start server brand=smolgit address=:3080
10:08AM INF starting SSH server addr=:3081
Generate default config.yaml
file with command ./bin/smolgit config > config.yaml
.
log:
# Color log output
color: true
# Log as json
json: false
# Log level (INFO, DEBUG, TRACE, WARN)
level: DEBUG
server:
# Disable web server
disabled: false
# Enable basic http auth
auth:
enabled: false
# Credentials for basic auth
accounts:
- login: user2
password: bar
- login: user1
password: foo
# Web server address
addr: ":3080"
# Navbar brand string
brand: "smolgit"
ssh:
# SSH server address
addr: ":3081"
git:
# Folder to save git repositories
path: /tmp/smolgit
# Base for clone string formating
# (e.g. ssh://[email protected]/myuser/project.git)
base: "[email protected]"
users:
# User name used for folder in git.path
- name: "bob"
# Permissions, wildcard or regex
# User to check access for other repositories
# '*' - access for all repositories
# 'admin' - access for admin's repositories
# '(admin|billy)' - access for admin's and billy's repositories
permissions: "*"
keys:
- ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQCq9rD9b8tYyuSLsTECHCn... [email protected]
cli options:
$> ./smolgit --help
Usage of ./smolgit:
-config string
path to config (default "./config.yaml")
In order to run smolgit
in docker there is the Dockerfile
.
make build-docker
config.yaml
file make config-docker
, it'll create config.yaml
in the current directory and mount it for docker.smolgit
in docker:$> make run-docker
docker run -it -p 3080:3080 -p 3081:3081 -v /path-to-smolgit-project/smolgit/:/etc/smolgit smolgit
3:53PM INF set loglevel level=DEBUG
3:53PM INF version version=dev
3:53PM INF initialize web server addr=:3080
3:53PM INF initialize ssh server addr=:3081
3:53PM INF start server brand=smolgit address=:3080
3:53PM INF starting SSH server addr=:3081
❤️
Contributions are more than welcome! Thank you!