Setting up SSH-Based CVS in Windows?
cromacks asks: "I am trying to set up CVS on my Windows 2000 machine so that I can checkout repositories from our server. As far as I know, it uses ssh authentication, and that seems to be giving me the problems. I'm using cvs from cvshome.org through my command line, and I have already set my environment variables (HOME, CVSROOT, and CVS_RSH=c:\WINNT\plink). The problem is, when i go to do the checkout, i receive the following error:
' from cvs serverning: unrecognized response 'cromacks@cs.bc.edu's password:
it repeats that line until I Ctrl-c.
Any suggestions?"
First, NTFS doesn't support the API to host a CVS server. It needs high-redudancy journaling capabilities which Just Aren't There Yet for Windows 2000.
Second, SSH is only secure when used in conjuction with /etc/passwd. Trying to authenticate against a LanManager-style NT/2k domain will compromise your security.
Cygwin will also set up a bash shell for you. then you can just set all your appropriate environment variables in your .bash_profile, etc, as normal, and use cvs from within the cygwin bash shell. maybe this isn't exactly the solution you were looking for but it's what we've been using here and it seems to work okay.
Geoff "Mandrake" Harrison
Some Random UI Hacker
Check out the 'ssh on win32' tutorial at sourceforge. That worked fine for me.
Thank you for Asking Slashdot!
I second the recommendation for Cygwin; good stuff.
.profile (or similar) file; hack it until it's silent (e.g., until the env command above only shows environment variable settings and nothing else).
The next time you upgrade your Cygwin installation (run setup.exe again), also pull down the keychain tool. It's a wrapper around ssh-agent, so you only have to enter your passphrase once per session.
Try
ssh -l user hostname command
to ensure you really can run commands remotely. env is a good one; it'll also let you check your PATH on the remote machine:
ssh -l user hostname env | egrep '^PATH='
If cvs isn't in one of the listed directories, set the CVS_SERVER environment variable to the full path name of the cvs command on the server:
CVS_SERVER=/opt/cvs/bin/cvs
Your error message suggests you might be getting some extra cruft as part of the rsh output. That usually means a wordy
If you think the problem is ssh-related, try:
CVS_RSH='ssh -v -v -v'"
(perhaps with fewer -v options). You may need to wrap that in a shell script. (Good thing you got bash as part of Cygwin, isn't it?)
Stupid job ads, weird spam, occasional insight at
Ok,
;c:\cygwin\bin;c:\Program Files\CVS for NT
:
1. Install Cygwin. Yeah it's a dumb shitty-ass pathetic installer, and those who built it should be slain and their bodies fed to pigs, but hey, the tools are nice when you are done.
2. Install CVSNT. Easy install, take it all.
3. Do yourself a favor. Add those two to the path. Right click on My Computer, select Properties, click the Advanced Tab, and click on Envionment Variables. Under System Variables, find the PATH statement, and add in the following :
4. While you are in there, add a new System Variable: CVS_RSH and set it to SSH.
Now, it's all set up and ready to use, as long as you know how to use CVS. (an entirely different question).
Now, if you like GUI tools at all I highly recommend the following
TortoiseCVS -- This can EASILY be setup to use SSH. As a matter of fact, the builds past 0.49 have it all ready to go. Read the docs, and you'll see.
and WinCVS -- Which is the king daddy of CVS Gui Apps for Windows. A bit clunky for my needs.
and Jalindi Igloo -- A SCC API plugin for CVS. What's that? -- It's allows Windows Development tools to use CVS instead of Visual Source Safe (VSS=a plague!). Sweet, simple and kinda nice if you like that kinda thing.
--
Wuff
"...In your answer, ignore facts. Just go with what feels true..."
I have that setup working on Win2K. What I did was this:
t h
1. Get the cvs package for windows from www.cvshome.org and install it.
2. Make sure that the cvs exe is in the path (to make life easy).
3. Get the ssh client from www.ssh.com - its the windows workstation version, it comes with a command line version of ssh (ssh2). It is free for non-commerial use (flame away, it works without messing with cygwin, which is what counts for me)
4. Make sure the ssh in in the path (again, makes life easy)
5. Make sure you can connect to your remote server (if applicatable) with ssh either from the gui or the command line (ssh2). You can set up key pairs or other authentication for ssh so that you won't be prompted for the password (if any). See the docs for the ssh server & ssh client for more information.
6. Set the following environment variables:
CVSROOT=:ext:user@server:/reposity/pa
CVS_RSH=ssh2
You should be good to go with the normal cvs command now (checkout, update, commit, etc). Test it out by checking out a module or two.
Note that this will not work for those repositories that use cvs's network abilities - for those you *might* be able to tunnel the connection over ssh, but only if the remote side is set up to handle those.
A good source of information for setting up cvs is here at www.cvshome.org
For the record, I have to agree with all the people complaining that this question belongs in a mailing list or a Usenet group, but that won't stop me from trying to help.
cygwin is a VERY good solution for unix functionality on windows and any sane linux user (in addition to any windows user looking to learn linux) should have it installed
/usr/bin/cvs $@
however, cygwin does not like the CVS_RSH environment variable (at least for me, in win2k as set by a shell script) and will conveniently forget it most of the time. my solution is another shell script:
#!/bin/bash
export CVS_RSH='/cygdrive/c/WINNT/plink'
One problem with my solution is that calling the script with the parameters commit -m "stuff with spaces" will strip the quotes and assume each word is a parameter. I have since stopped working on the project that required this (hey jay, now you know why some of my comments used underscores) so I have not tried escaping the quotes as \" which should do the trick.
Use my userscript to add story images to Slashdot. There's no going back.