Difference between revisions of "CVS Commit Access"

From WeBWorK_wiki
Jump to navigation Jump to search
m (marked as historical)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
  +
{{Historical}}{{Template:Outdated}}
  +
 
If you are a WeBWorK developer, you can get an account on <code>devel.webwork.rochester.edu</code> to allow you commit access to CVS. Mail root@devel.webwork.rochester.edu for an account.
 
If you are a WeBWorK developer, you can get an account on <code>devel.webwork.rochester.edu</code> to allow you commit access to CVS. Mail root@devel.webwork.rochester.edu for an account.
   
Line 5: Line 7:
 
In this case, access the CVS repository locally. To check out a module from CVS:
 
In this case, access the CVS repository locally. To check out a module from CVS:
   
cvs -dPA /webwork/cvs/<b><i>repository_name</i></b> checkout <b><i>module_name</i></b>
+
cvs -d /webwork/cvs/<b><i>repository_name</i></b> checkout <b><i>module_name</i></b>
   
 
Replace '''''repository_name''''' and '''''module_name''''' with values from the article [[List of CVS repositories hosted by The WeBWorK Project]]. (For example, you could use '''''repository_name''''' set to '''''npl''''' and '''''module_name''''' set to '''''NationalProblemLibrary''''' to checkout the main problem library.)
 
Replace '''''repository_name''''' and '''''module_name''''' with values from the article [[List of CVS repositories hosted by The WeBWorK Project]]. (For example, you could use '''''repository_name''''' set to '''''npl''''' and '''''module_name''''' set to '''''NationalProblemLibrary''''' to checkout the main problem library.)
Line 22: Line 24:
   
 
cvs -dPA :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/<b><i>repository_name</i></b> update <b><i>module_name</i></b>
 
cvs -dPA :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/<b><i>repository_name</i></b> update <b><i>module_name</i></b>
cvs -dPA :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/<b><i>repository_name</i></b> commit <b><i>module_name</i></b>
+
cvs -d :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/<b><i>repository_name</i></b> commit <b><i>module_name</i></b>
   
 
=== Avoiding typing your password ===
 
=== Avoiding typing your password ===

Latest revision as of 14:28, 21 June 2021

This article has been retained as a historical document. It is not up-to-date and the formatting may be lacking. Use the information herein with caution.
Outdated IMPORTANT: The content of this page is outdated. Do not rely on the information contained in this page.

If you are a WeBWorK developer, you can get an account on devel.webwork.rochester.edu to allow you commit access to CVS. Mail root@devel.webwork.rochester.edu for an account.

If you are doing development on devel itself

In this case, access the CVS repository locally. To check out a module from CVS:

cvs -d /webwork/cvs/repository_name checkout module_name

Replace repository_name and module_name with values from the article List of CVS repositories hosted by The WeBWorK Project. (For example, you could use repository_name set to npl and module_name set to NationalProblemLibrary to checkout the main problem library.)

If you are doing development on another machine

In this case, access the CVS repository over SSH.

First set the environment variable CVS_RSH to ssh. In bash, type export CVS_RSH=ssh. In tcsh, type setenv CVS_RSH ssh. Since you need this variable set whenever you want to use the WeBWorK CVS repositories, you might want to add the command to your .bashrc or .cshrc file (depending on your shell).

Then, to check out a module from CVS (i.e., download a local copy from the server):

cvs -dPA :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/repository_name checkout module_name

After modifying the local files you checked out, you can commit the changes (i.e., write them to the remote server) using:

cvs -dPA :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/repository_name update module_name
cvs -d :ext:user_name@cvs.webwork.rochester.edu:/webwork/cvs/repository_name commit module_name

Avoiding typing your password

When you use CVS remotely, you will have to type the password for your account on devel every time you issue a CVS command. This can get quite annoying. To avoid this, you can set up public-key SSH authentication.

Public-key SSH authentication will allow you to make SSH connections from one computer to another without ever sending a password across the network. You generate a pair of mathematically related keys, and keep one secret, while making the other one available to the server you wish to connect to.

First, generate the key pair (on the machine from which you'll be connecting):

   ssh-keygen -t dsa

the default answers will be fine at each of the prompts. Leave the password prompts blank).

Then, add the key to your account on devel:

cat ~/.ssh/id_dsa.pub | ssh user_name@devel.webwork.rochester.edu 'mkdir -p ~/.ssh && cat >> ~/.ssh/authorized_keys'

Some versions of OpenSSH come with a utility called ssh-copy-id which makes this task somewhat easier:

ssh-copy-id user_name@devel.webwork.rochester.edu