A lightweight HTTP/SSH mock server for testing Git clone and push operations against test fixture repositories. Version 2.0.0 (June 2020) adds full Git Protocol Version 2 support. Designed specifically for test suites, it uses copy-on-write to prevent persistent changes to repos and supports parallel test execution. Unlike git-http-server, it includes built-in CORS headers for browser tests with isomorphic-git, HTTP Basic Auth for 401 testing, and Git hooks. The SSH variant (git-ssh-mock-server) supports anonymous, password, and public key authentication. Released under MIT license with moderate maintenance activity.
npm install git-http-mock-serverNo compatibility data collected yet for this library.
Installs and runs the mock server via CLI, demonstrating clone/push operations and daemon mode with environment variables.
Ensure git is installed on the machine and available in PATH.
Install build tools if using npm install; consider using pre-built binaries.
Always run start/stop from the same working directory.
Install git and ensure it's available in your system PATH.
Set GIT_HTTP_MOCK_SERVER_PORT to a different port, e.g., export GIT_HTTP_MOCK_SERVER_PORT=9000