Skip to content

cvsserver Git Command Guide

The git cvsserver command runs a CVS server emulator, allowing CVS clients to access Git repositories. This provides backward compatibility for users still needing CVS client interfaces.

Terminal window
git-cvsserver [<pserver|server> [--base-path <path>] [--strict-paths] [--export-all] [--date-format <fmt>]] [pserver|server]
OptionDescription
—helpDisplay help
—versionShow version information
—base-path Prepend path for all CVSROOT config
—strict-pathsDon’t allow paths out of git repository
—export-allMake every repo available via CVS
—pub-dir Use path for public read-only access
—daemonRun as read-only daemon
—inetdRun in inetd mode
—access-check Check access permissions
ParameterDescription
pserverRun in pserver mode (password authenticated)
serverRun in server mode (SSH authenticated)
Terminal window
git-cvsserver --daemon --export-all

Starts a read-only CVS server daemon that provides access to all repositories.

Terminal window
git-cvsserver --inetd server

Runs cvsserver via inetd for SSH access.

Terminal window
git-cvsserver --base-path /home/cvs pserver

Starts CVS server with a base path for all repositories.

Terminal window
git-cvsserver --export-all server

Makes all Git repositories accessible via CVS interface.

Terminal window
git-cvsserver --pub-dir /var/git --daemon

Specifies public read-only directory for CVS access.

Terminal window
# Add to /etc/inetd.conf:
# cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver server

Configures inetd to run git-cvsserver for CVS connections.

How do I run a CVS server for Git repositories?

Section titled “How do I run a CVS server for Git repositories?”

To run a CVS server for Git repositories, use:

Terminal window
git-cvsserver --daemon --export-all

How can I set up CVS server with SSH access?

Section titled “How can I set up CVS server with SSH access?”

To set up CVS server with SSH access, run:

Terminal window
git-cvsserver --inetd server

To configure inetd for CVS server, add to /etc/inetd.conf:

Terminal window
cvspserver stream tcp nowait nobody /usr/bin/git-cvsserver git-cvsserver server

How can I restrict access to certain paths?

Section titled “How can I restrict access to certain paths?”

To restrict access to certain paths, use:

Terminal window
git-cvsserver --strict-paths server

How do I make my Git repository accessible via CVS?

Section titled “How do I make my Git repository accessible via CVS?”

To make your Git repository accessible via CVS, use:

Terminal window
git-cvsserver --export-all --daemon
  1. Providing backward compatibility for CVS users during Git migration
  2. Supporting legacy build systems that depend on CVS
  3. Enabling gradual adoption of Git in mixed-vcs environments
  4. Facilitating development workflows that mix CVS and Git tools
  5. Maintaining compatibility with existing CVS-based tooling
  6. Supporting enterprise environments with standardized VCS access