A configurable git server for Node.js
Serve git repositories over HTTP/HTTPS with full control over authentication, events and repository storage. ESM-only, requires Node.js 22+, and ships with zero runtime dependencies.
npm i @batchfy/node-git-serverDocumentation
Installation
Requirements and how to install node-git-server.
Quick Start
Stand up a git server and push your first repository.
Handling Events
React to push, fetch, tag, info and head requests.
Authentication
Protect repositories with HTTP basic auth.
Async Authentication
Authorize requests against a database or external service.
Sending Logs
Print messages back to the git client during a push.
HTTPS
Serve repositories over TLS.
Programmatic Directories
Resolve each repository's location dynamically.
Git
The Git class — constructor, options, methods and events.
Request Objects
The objects passed to push, tag, fetch, info and head listeners.