Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Microsoft

Setting up SSH-Based CVS in Windows? 44

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?"
This discussion has been archived. No new comments can be posted.

Setting up SSH-Based CVS in Windows?

Comments Filter:
  • If only... (Score:4, Funny)

    by tps12 ( 105590 ) on Tuesday June 04, 2002 @02:38PM (#3639731) Homepage Journal
    ...there were a CVS mailing list that could field questions like these. Or a site where you could search the web for answers to similar questions.

    Well, I can dream, can't I?
  • You are better off with a Linux or even a *BSD server.

    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.

    • I believe you may have mis-interpreted his question. It appears the CVS server itself is on a Unix-type system, but he is having problems checking out with his cvs client (most likely wincvs).

    • You are better off with a Linux or even a *BSD server.

      Well, certainly. But I had the impression that the question was about using a CVS client from the Windows box - not running the repository on a Windows box.

      I'm not real familiar with ssh on Windows, but I know that in the Unix world, the -v option has really helped me to find out where things break with greater precision.

    • Service Pack 2 [microsoft.com]adds a feature that performs transparent LanManager <-> /etc/passwd mapping for heterogenous networks. Due to protocol differences in MS's implementation, however, this is only compatible with SSH2, so depending on how many legacy machines need to be supported this might be an impractical solution.

      I'd say Linux looks like the solid winner on this one. So what else is new?

      ;)
      • Huh? I've never heard of this being in Win 2K..

        Could you be talking about Windows Services for Unix [microsoft.com]?

        And what does ssh2 compatibility have anything to do with legacy machine? SSH2 is the standard now - most recent boxen that have ssh use ssh2. And if they don't grab the latest openssh or buy the latest commercial ssh, problem solved.
  • cygwin. (Score:5, Informative)

    by Mandrake ( 3939 ) <mandrake@mandrake.net> on Tuesday June 04, 2002 @02:42PM (#3639759) Homepage Journal
    it's all about Cygwin. go to the cygwin site [cygwin.com] and download and run their setup.exe program ... you should pick and choose ssh, openssl, and cvs. that's what I've done to link together the few windows development machines I'm having to use at work with the rest of our development network via cvs. be aware that if you're using something like visual studio, etc, they hold read locks so you have to close the projects / workspaces / etc before cvs will read / write those files.

    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.

    • 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

      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'
      /usr/bin/cvs $@


      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.
  • by Tom7 ( 102298 )
    Check out the 'ssh on win32' tutorial at sourceforge. That worked fine for me.

    Thank you for Asking Slashdot!
  • Ugh (Score:4, Insightful)

    by photon317 ( 208409 ) on Tuesday June 04, 2002 @02:50PM (#3639826)

    wtf isup with Ask Slashdot lately? These kinds of questions belong in mailing lists, newsgroups, and webforums that are specifically targetted at supporting these products.

    Ask Slashdot should be about Big questions, questions that matter to large fractions of the geek population, questions that are very hard to answer, questions that deal more in the theory of things than in a technical answer to a specific problem.

    What amounts to a tech support request for CVS on Win2k doesn't belong here on the front page of slashdot, and this is only the most recent ina string of bad Ask Slashdots.
    • Thank you for saying it. Cliff is on crack with these postings. I have a theory that these are all problems Cliff is personally having, and he is using us as his personal help desk staff.

      * For the clueless, the last sentence was a joke.
    • Actually, I think its a decent question. Its not that normal of a configuration that it would be convered out there on the internet. The first time I did it I had to stumble through it on my own, and it took a little while to figure it out - even though I had done the same thing on Linux-Linux.

      If you don't like the question, then ignore it. I think that having a mix of questions makes /. more interesting.
  • How did this get selected? I think this is a conspiracy. This is obviously a question that is specific to a particular app that runs under Windows. It's not News for Nerds but more like a Windows Annoyance [annoyances.org] Sounds like Cliff was secretly replaced by a Perl script, or worse a VB script, that counts key words (ssh, cvs, environment variables, command line, password) and posts the highest scored submissions.
  • by stienman ( 51024 ) <adavis&ubasics,com> on Tuesday June 04, 2002 @02:58PM (#3639894) Homepage Journal
    unsubscribe slashdot-ssh_on_windows stienman@slashdot.org
    end
  • by Lumpish Scholar ( 17107 ) on Tuesday June 04, 2002 @03:24PM (#3640102) Homepage Journal
    I second the recommendation for Cygwin [cygwin.com]; good stuff.

    The next time you upgrade your Cygwin installation (run setup.exe again), also pull down the keychain [gentoo.org] 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 .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).

    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?)
    • Your error message suggests you might be getting some extra cruft as part of the rsh output. That usually means a wordy .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).

      Login scripts should only output stuff to the terminal if running in an interactive shell otherwise they'll break "scp" and aparently ssh CVS login as well.

      So the screen printing parts should be enclosed in something like this:

      case "$-" in

      *i*)

      (...)

      ;;
      esac

  • this link from amazon [amazon.com] has an incredible CVS book. It's written by one of the original authors of CVS, and goes into both Linux and Win32 CVS usage. I definitely suggest picking up a copy.

    Hope this helps.

    -Vic
  • by His name cannot be s ( 16831 ) on Tuesday June 04, 2002 @03:42PM (#3640208) Journal
    Ok,

    1. Install Cygwin [cygwin.com]. 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 [cvsnt.org]. 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 :
    ;c:\cygwin\bin;c:\Program Files\CVS for NT

    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 [tortoisecvs.org] -- 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 [wincvs.org] -- Which is the king daddy of CVS Gui Apps for Windows. A bit clunky for my needs.

    and Jalindi Igloo [jalindi.com] -- 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
    • What's wrong with the Cygwin installer? I've always liked it.
      • I'll tell you:

        1. Imagine for a minute that you are slightly handicapped, in that moving a mouse for you is difficult, or problematic.

        NOW TRY TO USE THAT GOD-AUFUL Installer. Just go ahead. I double dare you.

        What boggles my mind, is that for a predominiantly console-based set of apps, they make this lousy installer that forces you to use a MOUSE and and click a billion times in order to get everything. Like Hello? Even just an "Install ALL" button would be nice.

        This is quite sad, as Cygwin is pretty much a poster child for Open Source apps on Windows. And just to show how 'great' it is, they package it with the crappiest installer ever. Way To Go!

        • Ah, well that would do it then, eh? I suppose it would be pretty trivial to write a non-gui installer, though. Pity nobody has, but it should be relatively simple to do. Point taken, though.
          • > Ah, well that would do it then, eh? I suppose it
            > would be pretty trivial to write a non-gui
            > installer, though. Pity nobody has, but it should be
            > relatively simple to do. Point taken, though.

            It might be relatively simple to do from scratch, but unless we want a maintenance nightmare, the retrieval logic, tar logic, package database management logic, should all be shared between all variants of the installer. And given that until very recently we could not use exceptions, this presented a serious problem: The error raising mechanism for a GUI requires different information than that for a console program.

            BTW: The gui installer code base has support for command line arguments, so patches to add command line package selection/mirror selection etc are relatively straight forward... without cluttering up main.cc and thus prevent reuse in the command line version.

            Rob (Cygwin setup maintainer)
        • You don't even have to imagine that you are disabled.. Image that you're trying to explain to a typical unix user how to set up cygwin on their home windows machine so that they can use SSH.

          It starts off easy.. Go to www.cygwin.com, click on the download icon, run the setup.exe tool..

          And then it all goes to hell. It's truly inconceivable that cygwin makes you click on this miniscule icon (for those people at high resolutions) for each and every sub-package that you select. It's painful to describe and painful to perform.

          And then there's the actual download- I've found through painful experience that many of the mirror sites don't contain the all of the cygwin components you selected, or don't contain an up to date cygwin distribution, or simply die in the middle of your transfer. In some cases if you start downloading packages from one mirror and finish off with packages from another mirror, dependencies don't work out right because the packages on each mirror are different versions! In any of these cases you may spend up to an hour downloading and end up with JUNK.

          All this could be changed if there was a simple "default install, everything install, minimal install, custom install" choice like there is in ALMOST EVERY OTHER INSTALLER.

          The author had to go out of his way not to code such a feature, the sadistic bastard.

          You should also be able to download a single package containing the cygwin subpackages for your desired install. Ie, cygwin-standard.zip like the netscape days of yore (and winamp).

          Yes I know, "fix the code yourself!" say the ignorant slashpeople. I do fix code myself, but this UI is so intentionally bad the author should have to fix it himself to learn a lesson.
          • > It starts off easy.. Go to www.cygwin.com, click
            > on the download icon, run the setup.exe tool..
            >
            > And then it all goes to hell. It's truly
            > inconceivable that cygwin makes you click on
            > this miniscule icon (for those people at high
            > resolutions) for each and every sub-package that
            > you select. It's painful to describe and painful
            > to perform.

            And I'd love to offer resizeable windows. It's a high priority feature, when RL allows time to do it. My first focus is getting the console version operable, but the GUI contributers are aware of my desire for this. Someone will do it eventually...

            > And then there's the actual download- I've found
            > through painful experience that many of the
            > mirror sites don't contain the all of the cygwin
            > components you selected, or don't contain an up
            > to date cygwin distribution, or simply die in
            > the middle of your transfer. In some cases if
            > you start downloading packages from one mirror
            > and finish off with packages from another
            > mirror, dependencies don't work out right
            > because the packages on each mirror are
            > different versions! In any of these cases you
            > may spend up to an hour downloading and end up
            > with JUNK.

            Use the multiple-mirror feature. Just like apt-get , setup will intelligently select the most recent packages from multiple mirrors, and fail over in the event of errors (including MD5 validation failures).

            > All this could be changed if there was a simple
            > "default install, everything install, minimal
            > install, custom install" choice like there is in
            > ALMOST EVERY OTHER INSTALLER.

            I suggested this, but was overrulled some time ago. Whilst I am the software maintainer, the mandate is to deliver an installer that the cygwin package maintainers as a group approve of. (See the cygwin-apps list archives if you want to read up on the discussion about this).

            > You should also be able to download a single
            > package containing the cygwin subpackages for
            > your desired install. Ie, cygwin-standard.zip
            > like the netscape days of yore (and winamp).

            Tough. Not going to happen. Various reasons dictate this, including the horrendous amount of wastage this would cause. (Last count I did cygwin had 184 packages, which gives a horribly big number when you consider all the possible combinations).

            > Yes I know, "fix the code yourself!" say the
            > ignorant slashpeople. I do fix code myself, but
            > this UI is so intentionally bad the author
            > should have to fix it himself to learn a lesson.

            Actually, I inherited the code from the previous maintainer. I'm doing this as a volunteer. I reject your assertion that the GUI is intentionally bad, and suggest you research a little more before stating 'facts' that are really just opinion.

            Rob (Cygwin setup maintainer)
        • yup, i'd like to see Debian's dpkg/apt for cygwin...
        • >1. Imagine for a minute that you are slightly
          > handicapped, in that moving a mouse for you is
          > difficult, or problematic.

          This is a serious issue. It's one that will take a lot of effort to correct... and patches _will_ be gratefully accepted. At the moment, we are about 80% of the way to a shared code base with data/logic/gui separated out, so that we can build a console installer and a gui installer at the same time, without duplicate source code.

          > What boggles my mind, is that for a
          > predominiantly console-based set of apps, they
          > make this lousy installer that forces you to use
          > a MOUSE and and click a billion times in order
          > to get everything. Like Hello? Even just an
          > "Install ALL" button would be nice.

          Install all - click the word 'default' beside the category label 'All' until it shows 'install'. Voila. Done. That was _hard_ wasn't it. As for the reason for the GUI installer, the users of cygwin demanded it a few years ago. Surprising huh?

          Rob (Cygwin setup maintainer).
  • Easy way (Score:3, Informative)

    by mjstrom ( 244211 ) on Tuesday June 04, 2002 @03:58PM (#3640333)
    I have that setup working on Win2K. What I did was this:

    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/pat h
    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 [cvshome.org]
  • Wincvs+plink+pagent (Score:2, Interesting)

    by Antity-H ( 535635 )
    I personally use Wincvs and plink to do the actual cvs operations and I use a public/private key pair and pagent to avoid any nasty password prompt
    It has been working perfectly for a few months now.
    You can find the documentation you need to set this up there :
    http://www.devguy.com/fp/cfgmgmt/cvs/cvs_ssh.htm [devguy.com]
    or there
    http://sourceforge.net/docman/display_doc.php?doci d=766&group_id=1 [sourceforge.net]
    in any case if you want to avoid any such error as you describe I higly recommend you use the private/public key pair and an agent.
  • by killenheladagen ( 461470 ) on Tuesday June 04, 2002 @04:41PM (#3640622)
    When I solved the same problem I did a google search for cvs ssh windows [google.com] and as the fourh result there was these simple instructions: CVS Access Via SSH on Windows [devguy.com]. Just install putty ssh client and set up the environment variables.

    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.

  • The WinCVS docs have a minimalistic but functional page on this very topic!

    http://cvsgui.sourceforge.net/ssh.html [sourceforge.net]

    The most important points seem to revolve around using the correct SSH client (from ssh.com) and getting the RSA key (e.g., no password entry) authentication working. That's pretty specific to version of windows and installation technique, and is pretty well covered in the docs, so I'll leave you there.
  • Get TortoiseCVS (google helps, I don't have the
    home page handy), PuTTY and plink; it works like
    a charm for me.

"And remember: Evil will always prevail, because Good is dumb." -- Spaceballs

Working...