node-git-server is a highly configurable Git server implemented in Node.js, designed for embedding or standalone deployment within a Node.js environment. The project adheres to a 'zero dependency footprint' philosophy, aiming to keep its core lean and efficient. Its current stable version is 1.0.0, released recently after an extensive beta phase. Key differentiators include its programmatic control over Git operations, extensive configurability for authentication and authorization, and its origin as a hard fork of the well-established `pushover` library. The library migrated to TypeScript starting with version 1.0.0-beta.1, enhancing type safety and developer experience. It now requires Node.js version 16 or newer, aligning with modern Node.js LTS releases. The project shows an active development and release cadence, having frequently updated through its beta cycle to reach a stable 1.0.0 release.
npm install node-git-serverVerified import paths — ran on the pinned version, not inferred.
This quickstart code demonstrates how to set up a basic configurable Git server using node-git-server. It initializes a Git server instance, defines a directory for repositories, implements a simple username/password authentication mechanism, and handles push/fetch events. The server listens on a specified port, allowing users to clone and push to repositories managed by this instance.
Upgrade your Node.js runtime to version 16 or newer. Use a Node Version Manager (NVM) for easy switching.
Update your `authenticate` function to match the new `(type, repository, username, password, callback)` signature, or `(options: { type: string, repository: string, username?: string, password?: string, headers?: object }, callback)`. Refer to the 0.6.0 release notes for details.Ensure your project uses ESM imports (`import ... from '...'`) and is configured for TypeScript. If using CommonJS, check for potential compatibility issues or adjust your `tsconfig.json` and build setup.
Upgrade your Node.js runtime to version 16 or newer. For example, using nvm: `nvm install 16 && nvm use 16`.
Switch to ESM imports: `import { GitServer } from 'node-git-server';` and ensure your `package.json` has `"type": "module"` or files end with `.mjs`.Verify that your `authenticate` and `authorize` function callbacks match the expected `(error, success)` signature and that all arguments are correctly passed as per the documentation (e.g., `(type, repository, username, password, callback)`).
No dependency data recorded yet.