[cvsnt] using CVS_GETPASS

Misner, Ris rmisner at accelent.com
Thu Jan 22 17:06:50 GMT 2004


> I have to write simple CVS wrapper, and I have a problems 
> with login. I 
> found something about env var CVS_GETPATH and protocol 
> (patch) cvsgui. But 
> it don't work :-((.
> 
> Maybe Iam wrong
> 
> 
> C:\testxxx>set CVS_GETPASS 'jolanaa'
> CVS_GETPASS='jolanaa'
> C:\testxxx>"C:\cvs\cvs" login
> Logging in to :pserver:stehule at localhost:2401:/usr/local/cvs
> CVS password:
> 
> I need to write password. Why?


I don't know anything about built-in support for a CVS_GETPASS
environment variable, but you can write the password in the cvsroot
string, as in the following:

C:\testxxx>"C:\cvs\cvs"
-d:pserver:stehule:jolanaa at localhost:2401:/usr/local/cvs login
(broken down, that otion is:
-d:protocol:username:password at server:port:repository)

Or rather than login, just go straight to update, commit, etc.  I have
never had a need to use login for anything.  I'm not sure, but the login
command might always prompt for a password no matter what you do.  Other
commands like update, commit, tag, etc. never prompt me for a password
because I have stored mine in the CVS root strings in the meta data in
the CVS directories in my sandbox.

If you are using WinCVS, you can use its "change root" macro to change
the cvs root string that is stored in all of the cvs meta data files in
your sandbox so that you don't have to use the -d option every time you
execute a command.

If you want to use the environment to get the password, you can use DOS
tricks to accomplish that, as in:

C:\testxxx>set CVS_GETPASS 'jolanaa'
CVS_GETPASS='jolanaa'
C:\testxxx>"C:\cvs\cvs"
-d:pserver:stehule:%CVS_GETPASS%@localhost:2401:/usr/local/cvs login

Hope this helps :)

-Ris



More information about the cvsnt mailing list