Author Topic: CVS & SSH on windows  (Read 16130 times)

staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
CVS & SSH on windows
« on: December 05, 2009, 03:24:19 AM »
OK, I spent the prerequisite 2 hours on a problem with no Joy.  Searched the forums for help with CVS via SSH and it was slim pickings.  Can anyone please provide some specific docs and or examples of how to set this up in SE14x on windows talking to a linux server via ssh.  I have wincvs up and running fine. Thanks,  Scott

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: CVS & SSH on windows
« Reply #1 on: December 08, 2009, 07:46:15 PM »
We do not have specific support for CVS+SSH.  When we first did CVS support we thought we might need to do this, but the demand has been very, very low.  Let’s see if we can figure anything out:
  • What is your CVSROOT set to?
  • What happens when you try Tools>Version Control>History for <filename>



staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: CVS & SSH on windows
« Reply #2 on: December 08, 2009, 09:11:58 PM »
Well, first, there is basically zero documentation I could find on setting up CVS in SE.  If there is any, please point me to it.

So, when you say what is my CVSROOT, I ask - how is it to be set in SE?  Am I supposed to set it in windows env vars?  When I use the SE setup dialog, I see no option to let me set it to SSH (I see RSH which sets the CVSROOT string to :ext:... which is bogus (see attached screen shot)).  So, I know what the CVSROOT string SHOULD be but I can't figure out how to make SE set it to what I want.  I want it to be something like:

:ssh;username=zzz;password=zzz;hostname=zzz.zzz.zzz;port=22:/home/zzz...

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: CVS & SSH on windows
« Reply #3 on: December 08, 2009, 09:16:16 PM »
I believe for the most part people have it set in their environment before SlickEdit is launched.  We have not added the ssh type to this dialog because we do not have specific support for it.

Let's put that dialog aside for a moment.  If you set it in your environment before launching dialog (either by setting it in a console window and then launching SlickEdit, or setting it globally in your OS and then launching SlickEdit), what happens when you try to launch the history dialog?

staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: CVS & SSH on windows
« Reply #4 on: December 08, 2009, 10:47:48 PM »
it doesn't work.  As far as I can tell, SE generates the CVSROOT string as I showed it in the screen capture.  Thus, there seems to be no way to get SE to either pick up the corrent ENV value or to edit the value that it generates from the dialog settings.  In short, I seem stuck.  There was another forum thread that mentioned using plink, etc. but the comments were so thin that I could no figure out where to start with that. 

mkempisty

  • Community Member
  • Posts: 12
  • Hero Points: 1
Re: CVS & SSH on windows
« Reply #5 on: December 09, 2009, 02:27:13 PM »
I have found I can get SSH partially working for CVS but I have to do at least one manual step.

If you search the forums for remote building you will find information about using putty, pagent and plink.  I have set up keys on my local PC and our unix server to give me access.  Note: permissions on the key storage in your unix account are important. The .ssh directory needs to be 700 and authorized_keys needs to be 300.  This threw me for a while until I figured it out.

The CVS setup dialog limits you in what you can setup.  I found that if I edited vslick.ini to change the CVSROOT variable to:
CVSROOT=:extssh:mkempisty@server_name:/home/cvs
I got partial CVS access.

The CVS setup dialog does not generate extssh and will overwrite that if you try any updates from it.

With this I can read archive history and commit.  However doing a diff to older revisions usually fails with a can't checkout the older revision.  Unfortunately I haven't found a way for Slick's CVS interface to give me more info on what failed.  Help here would be appreciated.

staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: CVS & SSH on windows
« Reply #6 on: December 09, 2009, 05:26:25 PM »
OK, setting the CVSROOT in vslick.ini managed to get everything working except diff which fails miserably (and is one of the most useful features).  I have added two screen shots with the errors.  In the second screen shot you will see a reference to hostname "green".  This makes no sense to me - I have no hostname green anywhere.  It's like that is coming out of the bowels of SE.

Also, using the right options on the CVSROOT requires no ssh key files or any of that nonsense, as near as I can tell.  I have included a sample CVSROOT that specifies password, etc. and makes things painless, at least on my system:

:ssh;username=zzz;password=zzz;hostname=zzz.zzz.zzz;port=22:/home/spam/yourRepo

« Last Edit: December 09, 2009, 06:51:50 PM by staggart »

mkempisty

  • Community Member
  • Posts: 12
  • Hero Points: 1
Re: CVS & SSH on windows
« Reply #7 on: December 09, 2009, 05:34:41 PM »
I get the same type of first error but the second has less info than yours.  This is what I see for the 2nd...

staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: CVS & SSH on windows
« Reply #8 on: December 09, 2009, 06:18:40 PM »
do the rest of your SE CVS commands work?

mkempisty

  • Community Member
  • Posts: 12
  • Hero Points: 1
Re: CVS & SSH on windows
« Reply #9 on: December 09, 2009, 06:20:50 PM »
Commit & history work. Compare has worked in the past, haven't tried it recently.  Usually check out directly in unix (access the files through Samba.)

-- Mark

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: CVS & SSH on windows
« Reply #10 on: December 09, 2009, 08:16:05 PM »
@staggart

Please set the macro variable _CVSDebug to 1 (Macro>Set macro variable).

Then try to run the diff command.  This will bring up a window titled "vsapi.dll" with debug information.  Please give this window focus, press Ctrl-X to cut the info from there, and send that to me.  I will PM you my email address.  This won't have anything too sensitive, but there will be path information in there so you won't want to post it here (hopefully you can send it to me).

staggart

  • Community Member
  • Posts: 8
  • Hero Points: 0
Re: CVS & SSH on windows
« Reply #11 on: December 09, 2009, 08:31:19 PM »
OK, I did that.  I edited the sensitive info out.  I see the strangeness but I am not sure where it is coming from.  In the second cvs command there is a second "-d" parameter that specifies some strange user info: "tomn@green".  I have no clue where that is coming from.

CVSShell:FileOrPath=<correct_file_path_here>\d_dif_type_0.cpp
CVSShell:cwd=<correct_file_path_here> command="C:\Program Files\cvsnt\cvs.exe" -d :ssh;username=zzz;password=our_password;hostname=our.host.name;port=22:/home/our_repo  1>C:\DOCUME~1\scott\LOCALS~1\Temp\4892003b0 2>C:\DOCUME~1\scott\LOCALS~1\Temp\4892002b0 status d_dif_type_0.cpp
CVSShell:pid=-1 status=0
CVSShell:FileOrPath=C:\DOCUME~1\scott\LOCALS~1\Temp\
CVSShell:cwd=C:\DOCUME~1\scott\LOCALS~1\Temp command="C:\Program Files\cvsnt\cvs.exe" -d :ssh;username=zzz;password=our_password;hostname=our.host.name;port=22:/home/our_repo -d tomn@green:/homedata/TomekFiles/OakGateTech/OgCVSRepo/ogrep co >C:\DOCUME~1\scott\LOCALS~1\Temp\4892002b0 2>&1 -d 4892003b0   oakgate/SVDriver/pdriver/directed_test/common/dif/d_dif_type_0.cpp
CVSShell:pid=-1 status=1


Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: CVS & SSH on windows
« Reply #12 on: December 09, 2009, 08:38:25 PM »
Can you please type "set" on the SlickEdit command line, and send me the resulting buffer?

If you are not familiar with the SlickEdit command line, click at the bottom of the editor to the left of the status information.

mkempisty

  • Community Member
  • Posts: 12
  • Hero Points: 1
Re: CVS & SSH on windows
« Reply #13 on: December 17, 2009, 04:30:18 PM »
Has there been any resolution to this problem?

Dan

  • SlickEdit Team Member
  • Senior Community Member
  • *
  • Posts: 2896
  • Hero Points: 153
Re: CVS & SSH on windows
« Reply #14 on: December 17, 2009, 04:33:42 PM »
Not yet, we had taken the discussion to email.  Are you in a similar situation?