Summary: | cervisia refuses to use ssh - always reverts back to rsh | ||
---|---|---|---|
Product: | [Applications] cervisia | Reporter: | John K. Browne <jkb> |
Component: | general | Assignee: | Christian Loose <christian.loose> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
print_env
patch for cvsservice/cvsservice.cpp |
Description
John K. Browne
2004-04-25 06:11:06 UTC
Does it help if you set the environment variable? declare -x CVS_RSH="ssh" or something like that? Hi John, On Sunday 25 April 2004 06:11, John K.Browne wrote: > It appears that cervisia does not want to initiate a connection to a > cvs server over ssh. I have configured cervisia with the information > for my cvs server using: > > Repository: > :ext:jbrowne mycvsserver com:/home/cvsdata do you mean :ext:jbrowne@mycvsserver.com ... ? > Use remote shell: > ssh OK. > Invoke this program on server side: > <blank> OK. > Compression level: > Default OK. > When I attempt to checkout the module I need, cervisia sits there for > about 30 seconds, then I get a "connection refused" message in the > bottom window. So, I did a tcpdump on the cvs server to see if > cervisia was even communicating with it. It shows that, despite my > configuration above, it's attempting to connect to port 514 (rsh) > instead of using ssh. Hm, it works for me with Cervisia from CVS HEAD and version 2.1.2. > My public key is where it needs to be on the cvs server, and I have > verified that I can log into the cvs server using a konsole. just with ssh jbrowne@mycvsserver.com or do you need some extra options? > No password needed. I never used a SSH key without passphrase so I don't know if this could be the problem. > This is mute anyway, since it appears cervisia is > not even connecting using ssh, it's using rsh instead. Can you checkout your module from a console (don't forget to set CVS_RSH=ssh before)? André Thanks for the replys guys.. Brad, I am aware of the CVS_RSH environment variable using the command-line cvs, but where exactly are you suggesting I set it for cervisia? In a konsole before running cervisia from the same konsole? Andre, Yes, I did mean "jbrowne at mycvsserver.com". For some reason, the "at" symbol didn't make it through in my post. Oh well, anyway... I can, in fact, ssh to my cvs server, using no additional options, and I am not asked for a password or passphrase. CVS over ssh (using CVS_RSH=ssh) also works for me from the command line, no problems. I can checkout my module using the command-line cvs and everything works as expected. I'm confused as to why cervisia isn't working for me. It's not that hard to set up, just a-few gui options. But, tcpdump on my cvs server always says it's trying to connect via rsh instead of ssh. I've tried getting cervisia working on three different machines with these same settings, and I get the same results. No connection attempts to the cvs box on port 22, like you would expect. The only common denominator among these machines is they all are on Slackware. I'm at a total loss.. :( My first guess would be that the retrieval of the configuration option in cvsservice/repository.cpp fails. John, please take a look at the configuration file cvsservicerc in the directory ~/.kde/share/config. It should contain a configuration group like [Repository-:ext:jbrowne@mycvsserver.com:/home/cvsdata]. Could you please copy&paste the configuration entries under this group including the above header and add it to this report? Thanks Christian Sure.. Here is the contents of cvsservicerc, only one entry: [Repository-:ext:jbrowne@mycvsserver.com:/home/cvsdata] Compression=-1 cvs_server= rsh=ssh I did modify my actual domain name to mycvsserver.com, but otherwise it's exactly what is in my cvsservicerc....colons in the same place, etc.. Just so you have it, here also is my cervisiapartrc: [AddRepositoryDialog] Height 864=345 Width 1152=530 [CheckoutDialog] Branch= Module=webcode Repository=:ext:jbrowne@mycvsserver.com:/home/cvsdata Working directory=$HOME/cvsdata [Repositories] Repos=:ext:jbrowne@mycvsserver.com:/home/cvsdata [RepositoryDialog] Height 864=345 Width 1152=530 [RepositoryListView] ColumnOrder=0,1,2,3 ColumnWidths=68,52,77,47 SortAscending=true SortColumn=0 [Session] Commit Recursive=false Create Dirs=true Do cvs edit=false Hide Empty Directories=false Hide Files=false Hide Non CVS Files=false Hide Removed Files=false Hide UpToDate Files=false Prune Dirs=true Splitter Pos 1=223 Splitter Pos 2=112 Update Recursive=false [UpdateView] ColumnOrder=0,1,2,3,4 ColumnWidths=280,90,70,90,120 SortAscending=true SortColumn=0 And, cervisiarc: [MainWindow] Height 864=405 Width 1152=670 [MainWindow Toolbar mainToolBar] Index=0 [Session] Current Directory= I started fresh by deleting all three of these files, and only re-configuring cervisia with my cvs server's information. These files are the result of that. Still no luck, tcpdump says it's trying on port 514 instead of 22. Thanks for the help. Ok, I figured out why it's probably working for some and not for me. Most people probably already have CVS_RSH=ssh set in their .bash_profile/.bashrc or .xsession/.xinitrc before kde even loads. I did not. Once I did that, cervisia started working as expected. So, apparantly, setting "Use remote shell" to "ssh" does not properly trigger cervisia to use ssh, as it should. Confirmation anyone? On Monday 26 April 2004 16:33, John K.Browne wrote: > Ok, I figured out why it's probably working for some > and not for me. Most people probably already have CVS_RSH=ssh set in > their .bash_profile/.bashrc or .xsession/.xinitrc before kde even I have it in my .bashrc. But I started Cervisia from a Konsole and before I entered unset CVS_RSH and it works as expected. > loads. I did not. Once I did that, cervisia started working as > expected. So, apparantly, setting "Use remote shell" to "ssh" does > not properly trigger cervisia to use ssh, as it should. Configure Cervisia to use the attached file (make it executable with chmod +x) as cvs program and have a look at /tmp/cervisia_env. Created an attachment (id=5796) print_env Andre, Ok, it seems the problem only occurs when I attempt to *checkout* a module, not run an update, query update, etc.. After I did get it working by putting CVS_RSH in my .bash_profile, I went back and took CVS_RSH=ssh out, logged out, logged back in, and loaded kde. I had already checked out my module in cervisia before, when it was working, and cervisia was able to connect with ssh using the newly checked out local sandbox *without* the CVS_RSH in my .bash_profile. Strange. So, I attempted to checkout the module again, to a different directory. No go, tries using rsh. I did use your script, and the contents of /tmp/cervisia_env corroborates this.....the tmp file is empty when I attempt to checkout a module. But, when I run an update, the tmp file contains CVS_RSH=ssh. On Monday 26 April 2004 17:26, John K.Browne wrote:
> different directory. No go, tries using rsh. I did use your script,
> and the contents of /tmp/cervisia_env corroborates this.....the tmp
> file is empty when I attempt to checkout a module. But, when I run
> an update, the tmp file contains CVS_RSH=ssh.
OK, this is a bug in Cervisia.
@Christian: all jobs which work without a working copy (which uses
auto_ptr in CvsService) use the current repository settings
(CvsService::Private::setupNonConcurrentJob()) but not the settings of
the temporary repository).
Created attachment 5798 [details]
patch for cvsservice/cvsservice.cpp
Could you please test the attached patch?
Just go into the kdesdk/cervisia/cvsservice directory and type in: patch <
bug-80291-patch.diff. Afterwards make and make install to compile and install
the new version.
Thanks for your help!
Christian
Patch appeared to take care of my problem. Thank you so much! You guys rock. CVS commit by cloose: Backport fix for BR #80291: Cervisia ignores the CVS_RSH=ssh setting during the checkout of a cvs module. A special thanks goes to John K. Browne for his help and for testing the patch. CCMAIL: 80291-done@bugs.kde.org M +6 -0 ChangeLog 1.106.2.7 M +11 -7 cvsservice/cvsservice.cpp 1.34.2.1 --- kdesdk/cervisia/cvsservice/cvsservice.cpp #1.34:1.34.2.1 @@ -65,5 +65,5 @@ struct CvsService::Private CvsJob* createCvsJob(); - DCOPRef setupNonConcurrentJob(); + DCOPRef setupNonConcurrentJob(Repository* repo = 0); bool hasWorkingCopy(); @@ -211,5 +211,5 @@ DCOPRef CvsService::checkout(const QStri *d->singleCvsJob << module; - return d->setupNonConcurrentJob(); + return d->setupNonConcurrentJob(repo.get()); } @@ -447,5 +447,5 @@ DCOPRef CvsService::import(const QString *d->singleCvsJob << module << vendorTag << releaseTag; - return d->setupNonConcurrentJob(); + return d->setupNonConcurrentJob(repo.get()); } @@ -775,9 +775,13 @@ CvsJob* CvsService::Private::createCvsJo -DCOPRef CvsService::Private::setupNonConcurrentJob() +DCOPRef CvsService::Private::setupNonConcurrentJob(Repository* repo) { - singleCvsJob->setRSH(repository->rsh()); - singleCvsJob->setServer(repository->server()); - singleCvsJob->setDirectory(repository->workingCopy()); + // no explicit repository provided? + if( !repo ) + repo = repository; + + singleCvsJob->setRSH(repo->rsh()); + singleCvsJob->setServer(repo->server()); + singleCvsJob->setDirectory(repo->workingCopy()); return singleJobRef; --- kdesdk/cervisia/ChangeLog #1.106.2.6:1.106.2.7 @@ -1,2 +1,8 @@ +2004-04-26 Christian Loose <christian.loose@kdemail.net> + + * Fix BR #80291: + Cervisia ignores the CVS_RSH=ssh setting during + the checkout of a cvs module. + 2004-04-13 Christian Loose <christian.loose@kdemail.net> |