SettingUpSshCvs

From W3C Tools Support Wiki


The purpose of this page

This page is intended for use in collecting recipes that complement the existing documentation on using CVS on W3C servers with user contributed instructions on how to set up existing tools to establish a working environment with W3C CVS servers through ssh.

See also Tantek Çelik W3C CVS For Dummies.

Note: CVS is only recommended for expert users. If you would prefer to use a simpler interface to edit pages on the Web site, consider WebDAV.

SSH Key notes

SSH keys used for W3C access MUST be in the SSH 2 protocol format. There is existing documentation describing how to generate new keys. See SSH Tutorial for Linux (and Mac OS) and SSH Tutorial for Windows for instance.

CVS Client Software

Disclaimer: W3C does not keep a list of current CVS clients. The information we provide here is added as it becomes available and is updated periodically as newer information is reported. There is a well-maintained list of clients on the Ximbiot site. You may want to compare the various available SSH clients to select the best one for your needs.

Unix clients

GNU cvs

On most Unix (linux) machines, cvs is included and you can use it as a command line tool. If it was not the case on your system, you can download cvs from GNU Web site.

Windows clients

GNU cvs

One of the main hurdles to running CVS on Windows was that SSH was not natively supported. However, starting with the Windows 10 April Update, deployed in April-May 2018, the OpenSSH library is now included in Windows and typically available in the C:\Windows\System32\OpenSSH\ folder. As a result, to use CVS as a command line tool on a Windows system, all you have to do is to download and install cvs for Windows from the GNU Web site.

Beware when setting the CVS_RSH environment variable though, the OpenSSH distribution is 64-bit only, whereas the latest version of the cvs command-line interface is 32-bit. If the CVS_RSH variable points to the System32 folder, Windows will automatically redirect that to the SysWOW64 folder, which contains 32-bits versions of executables but does not contain OpenSSH (why System32 contains 64-bit versions whereas SysWOW64 contains 32-bit version is anyone's guess), and CVS will fail to run SSH. To force the use of the 64-bits version of SSH, you should set CVS_RSH to %SYSTEMROOT%\Sysnative\OpenSSH\ssh.exe (alternatively, you can copy the ssh.exe executable to some other folder that does not have weird automated redirection rules).

cervisia

cervisia is a cvs KDE GUI client that works under linux and other platforms that support KDE. It looks and feels very similar to smartcvs. It has in-built support for both CVS and ssh.

I'm not sure if this page is still up to date for using it on MacOs

For Windows 11, you may try installing it using the linux sub system (please complete this section if you have further feedback).

tkrev

tkrev (formerly known as tkcvs) is a multi-platform CVS GUI client based on tcl/tk. In addition to CVS, tkrev also supports git, svn, and RCS and is still being actively maintained (March, 2023). The only drawback for this tool is that it lacks accessibility and support for screen readers. This is not a shortcoming of the tool itself but of tcl/tk.

tkrev assumes you have a working cli cvs and ssh installed and configured (i.e., the CVS_RSH variable). As our current cvs setup does not handle modules, prior to launching tkrev, you will have to do a checkout of the cvs repository where you want to do your CVS operations, such as add new files / directories, update or delete files, etc. You can then either change to that directory and run tkrev or launch tkrev itself and point it to the CVS checkout directory.

You may find it ready available in your linux distribution or a binary package + info on how to install it in your own platform in their Download. Make sure you install the latest version.

For some systems, like MacOS, you may need to preinstall tcl/tk. If you don't find that package available, one good choice is to use ActiveTCL. You can use the info in this tutorial on how to install tcl/tk on different platforms as well as a hello world tcl script to help you test your installation.

If you're installing it from the source package, here's how to install it:

  1. Download the latest version of tkrev from its download page
  2. tar -xzf tkrev_9.4.4.tar.gz
  3. cd tkrev_9.4.4
  4. Run the install tcl script and choose the directory where you want to install it
    1. wish doinstall.tcl
  5. Assuming your installation has the path to run tkrev, launch it to see it works
    1. tkrev

You can now work with tkrev. However, you first need to checkout the CVS repository where you want to work on. For this demo, I'll assume you have cvs installed and that you have checkout the following directory

  1. cd /tmp # you could use any directory
  2. cvs -d yourusername@cvs.w3.org:/w3ccvs co -l WWW/2023/02/wincvs-tests
  3. Now either change to the WWW/2023/02/wincvs-tests directory and launch tkrev or use the cli to tell tkrev where is your checkout directory (those options can be configured)
    1. tkrev /tmp/WWW/2023/02/wincvs-tests
  4. you can now click on the files to edit them and use tkrev's CVS menu to choose the operations you want to do

SmartCVS (deprecated since 2014, use tkrev ir cervisia instead)

SmartCVS is a multi-platform CVS GUI client.

In the following we assume you have already generated an SSH RSA pubkey pair (2048 bits minimum key length).

To make SmartCVS work with SSH, follow these steps:

  1. Launch SmartCVS and select "Check out project from repository"
  2. Under "Repository profile: Manage..." and press "manage", then "add"
  3. Under General Options:
    1. choose access method: ext (SSH1.SSh2) and checkbox use: ssh: prefix.
    2. user-name: your-w3c-account-name
    3. server name: cvs.w3.org
    4. repository path: /w3ccvs
  4. Press next and move on to configuration:
    1. Authentication: public/private key
    2. Choose private key file (the one generate with Putty earlier on
    3. Add passphrase (if you don't want to type it each time
    4. ssh-type to use: ssh2
    5. Prefered public key: rsa
    6. Verify connection when pressing next
  5. After pressing next you should see the fingerprint for cvs.s3.org (either of these)
   MD5:fb:30:ab:09:1c:b3:1a:74:93:67:57:fd:69:16:0b:97
   SHA256:TatDppQoix+QOHFKznVqMZIaEROW3VR4ycdD6pD8q1o

TortoiseCVS (deprecated, use tkrev or cervisia instead)

TortoiseCVS lets you work with files under CVS version control directly from Windows Explorer. To make TortoiseCVS work with SSH, follow these steps:

  1. Open the TortoiseCVS settings and go to the "Tools" tab
  2. Look for the row "SSH Application (only :ext:)" and make sure that "C:\Program Files\TortoiseCVS\TortoisePlink.exe" is specified there (or the directory where you have installed TortoiseCVS)
  3. Set your public key:
    • a) If you are using Putty's Pageant then add the (Putty) public key into Pageant and you are all set to connect to the CVS server.
    • b) If you are not using Pageant then you have to specify the location of your (Putty) public key with "-i c:\path\to\your\public\key.ppk" on the row "SSH Parameters (only :ext:)" in addition to the already given parameters and then connect.

Note also Jeremy's mail to configure putty.

To set up a specific server / repository, see Richard's instructions

Cygwin

Cygwin is a Linux-like environment for Windows. It includes CVS and OpenSSH. Dr. Thomas Baker has written a detailed description of Using CVS with SSH in a Unix-like shell environment under Windows.

Note: In my experience (Feb 2009), setting environment variables alone did not work because ssh required some additional parameters, and I had to write a shell script to supply those, setting the CVS_RSH variable to point to the script: My script (called sshw3.sh) looks like this:

         #!/bin/sh
         ssh -2 -i ~/key-name.rsa $1 $2 $3 $4 $5

(forcing protocol version 2, selecting the correct identity key and passing values from the CVS client which calls ssh) I then ran

         export CVS_RSH=~/sshw3.sh


NetBeans IDE

NetBeans IDE contains a reference that describes SSH usage with IDE.

Eclipse

Eclipse contains support for SSH and CVS. See Setting W3C CVS Public or Restricted Repositories for Eclipse 3.x.

Macintosh Clients

Mac OS X is a unix BSD system, and then you can easily use CVS on the machine once you have installed Xcode Tools CD that accompanies Mac OS X. The manual Version Control with CVS on Mac OS X will easily guide you through the steps of using it. It means also that all Java GUI working for Unix will work Mac OS X as well.

XCode

XCode is the graphical environment development of Apple. You can use CVS from the GUI of XCode

BBedit

BBedit is an XHTML Editor for the macintosh which includes menu for CVS.

CVL

CVL (Concurrent Versions Librarian) is a version and configuration management tool for MacOS X. CVL is a graphical user interface to CVS (Concurrent Versioning System) most often used commands.

Emacs Clients

Emacs is known to be able to do more than one thing. It is then possible to use CVS inside Emacs.

Emacs built in Version Control

Emacs has a built in Version Control system (for CVS, RCS and SCCS) system. There is no reason to leave emacs for the command prompt. Look under Tools menu, then Version Control or M-x vc- and then tab complete to see the options.

pcl-cvs mode

pcl-cvs is a GNU Emacs front-end to CVS. It can be difficult to install, if you need help, contact Ted.