# Using CVS from a script

This topic is 4340 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

I want to write a script that runs nightly and checks out my project from my local CVS server and then builds it. But I can't figure out how to do it. Whenever I run CVS it prompts for a password. How do you give CVS the password from within a script? Is there another way to do this (without using something heavyweight like CruiseControl)?

##### Share on other sites
I tried to set up anonymous CVS following these instructions, but whenever I try to connect I get the message:
cvs [checkout aborted]: connect to 192.168.0.101(192.168.0.101):2401 failed: Connection refused

But what you're saying is that once I get that working I should be able to specify a blank password on the command line?

##### Share on other sites
Depends on the authentication protocol and how you've set that up.

If you're using the pserver protocol, you only need to do a cvs login once, and the password will be stored in your \$HOME/.cvspass file.

If you're using SSH tunneling and you've got a passwordless key registered on the remote machine (like SourceForge does it) you don't need to give a password.

Other authentication schemes do require a password, in which case you may be fsked if you want to script things. Anonymous CVS should not be using a password-protected scheme.