* cvsimport does not work with passwords ? @ 2011-04-28 20:59 Marcin Wiśnicki 2011-04-28 21:03 ` Marcin Wiśnicki ` (2 more replies) 0 siblings, 3 replies; 8+ messages in thread From: Marcin Wiśnicki @ 2011-04-28 20:59 UTC (permalink / raw) To: git I have to import part of public cvs repository that is protected by password (which is "anoncvs"): > export CVSROOT=:pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs > cvs login And now I can use cvs and cvsps, when I try git however: > git cvsimport -vk projects/pkgtools AuthReply: I HATE YOU It seems that it does not send the password. From captured network conversation: -> BEGIN AUTH REQUEST -> /home/ncvs -> anoncvs -> A -> END AUTH REQUEST <- I HATE YOU But `cat ~/.cvspass`: /1 :pserver:anoncvs@anoncvs.fr.freebsd.org:2401/home/ncvs Ay=0=h<Z So why is git not sending the password ? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: cvsimport does not work with passwords ? 2011-04-28 20:59 cvsimport does not work with passwords ? Marcin Wiśnicki @ 2011-04-28 21:03 ` Marcin Wiśnicki 2011-04-28 21:35 ` Marcin Wiśnicki 2011-04-29 11:33 ` Andreas Schwab 2 siblings, 0 replies; 8+ messages in thread From: Marcin Wiśnicki @ 2011-04-28 21:03 UTC (permalink / raw) To: git On Thu, 28 Apr 2011 20:59:57 +0000, Marcin Wiśnicki wrote: >> git cvsimport -vk projects/pkgtools > AuthReply: I HATE YOU > Forgot to mention: > git --version git version 1.7.4.4 ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: cvsimport does not work with passwords ? 2011-04-28 20:59 cvsimport does not work with passwords ? Marcin Wiśnicki 2011-04-28 21:03 ` Marcin Wiśnicki @ 2011-04-28 21:35 ` Marcin Wiśnicki 2011-04-28 22:45 ` Jeff King 2011-04-29 11:33 ` Andreas Schwab 2 siblings, 1 reply; 8+ messages in thread From: Marcin Wiśnicki @ 2011-04-28 21:35 UTC (permalink / raw) To: git On Thu, 28 Apr 2011 20:59:57 +0000, Marcin Wiśnicki wrote: > I have to import part of public cvs repository that is protected by > password (which is "anoncvs"): > >> export CVSROOT=:pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs cvs >> login > I have tried another mirror that uses ssh: > export CVSROOT=:ext:anoncvs@anoncvs1.FreeBSD.org:/home/ncvs > export SSH_RSH=ssh And this also does not work because git tries to use rsh. According to google this should work. Any ideas why cvsimport is so broken for me ? ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: cvsimport does not work with passwords ? 2011-04-28 21:35 ` Marcin Wiśnicki @ 2011-04-28 22:45 ` Jeff King 2011-04-28 22:50 ` Marcin Wiśnicki 0 siblings, 1 reply; 8+ messages in thread From: Jeff King @ 2011-04-28 22:45 UTC (permalink / raw) To: Marcin Wiśnicki; +Cc: git On Thu, Apr 28, 2011 at 09:35:53PM +0000, Marcin Wiśnicki wrote: > I have tried another mirror that uses ssh: > > > export CVSROOT=:ext:anoncvs@anoncvs1.FreeBSD.org:/home/ncvs > > export SSH_RSH=ssh > > And this also does not work because git tries to use rsh. > According to google this should work. > > Any ideas why cvsimport is so broken for me ? It has (thankfully) been a long time since I've had to touch CVS, but shouldn't that be CVS_RSH on the second line? -Peff ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: cvsimport does not work with passwords ? 2011-04-28 22:45 ` Jeff King @ 2011-04-28 22:50 ` Marcin Wiśnicki 0 siblings, 0 replies; 8+ messages in thread From: Marcin Wiśnicki @ 2011-04-28 22:50 UTC (permalink / raw) To: git On Thu, 28 Apr 2011 18:45:10 -0400, Jeff King wrote: > On Thu, Apr 28, 2011 at 09:35:53PM +0000, Marcin Wiśnicki wrote: > >> I have tried another mirror that uses ssh: >> >> > export CVSROOT=:ext:anoncvs@anoncvs1.FreeBSD.org:/home/ncvs export >> > SSH_RSH=ssh >> >> And this also does not work because git tries to use rsh. According to >> google this should work. >> >> Any ideas why cvsimport is so broken for me ? > > It has (thankfully) been a long time since I've had to touch CVS, but > shouldn't that be CVS_RSH on the second line? > > -Peff Ahh yes indeed. I made a silly typo, now it works. ^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: cvsimport does not work with passwords ? 2011-04-28 20:59 cvsimport does not work with passwords ? Marcin Wiśnicki 2011-04-28 21:03 ` Marcin Wiśnicki 2011-04-28 21:35 ` Marcin Wiśnicki @ 2011-04-29 11:33 ` Andreas Schwab 2011-04-29 13:09 ` [PATCH] git-cvsimport: normalize hostname for password lookup Andreas Schwab 2 siblings, 1 reply; 8+ messages in thread From: Andreas Schwab @ 2011-04-29 11:33 UTC (permalink / raw) To: Marcin Wiśnicki; +Cc: git Marcin Wiśnicki <mwisnicki@gmail.com> writes: >> export CVSROOT=:pserver:anoncvs@anoncvs.fr.FreeBSD.org:/home/ncvs > /1 :pserver:anoncvs@anoncvs.fr.freebsd.org:2401/home/ncvs Ay=0=h<Z Note the different case. Andreas. -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply [flat|nested] 8+ messages in thread
* [PATCH] git-cvsimport: normalize hostname for password lookup 2011-04-29 11:33 ` Andreas Schwab @ 2011-04-29 13:09 ` Andreas Schwab 2011-04-29 16:33 ` Junio C Hamano 0 siblings, 1 reply; 8+ messages in thread From: Andreas Schwab @ 2011-04-29 13:09 UTC (permalink / raw) To: Marcin Wiśnicki; +Cc: git When looking up the pserver password in .cvspass normalize the hostname part of the address by converting it to lowercase. Signed-off-by: Andreas Schwab <schwab@linux-m68k.org> --- git-cvsimport.perl | 4 ++++ 1 files changed, 4 insertions(+), 0 deletions(-) diff --git a/git-cvsimport.perl b/git-cvsimport.perl index bbf327f..046fe32 100755 --- a/git-cvsimport.perl +++ b/git-cvsimport.perl @@ -249,6 +249,8 @@ sub conn { # if username is not explicit in CVSROOT, then use current user, as cvs would $user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user; + # Normalize hostname for lookup in .cvspass + $serv = lc $serv; my $rr2 = "-"; unless ($port) { $rr2 = ":pserver:$user\@$serv:$repo"; @@ -263,6 +265,8 @@ sub conn { # :pserver:cvs@mea.tmt.tele.fi:/cvsroot/zmailer Ah<Z while (<H>) { chomp; + # FIXME: entries without version prefix + # may need to be normalized s/^\/\d+\s+//; my ($w,$p) = split(/\s/,$_,2); if ($w eq $rr or $w eq $rr2) { -- 1.7.5 -- Andreas Schwab, schwab@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 1756 01D3 44D5 214B 8276 4ED5 "And now for something completely different." ^ permalink raw reply related [flat|nested] 8+ messages in thread
* Re: [PATCH] git-cvsimport: normalize hostname for password lookup 2011-04-29 13:09 ` [PATCH] git-cvsimport: normalize hostname for password lookup Andreas Schwab @ 2011-04-29 16:33 ` Junio C Hamano 0 siblings, 0 replies; 8+ messages in thread From: Junio C Hamano @ 2011-04-29 16:33 UTC (permalink / raw) To: Andreas Schwab; +Cc: Marcin Wiśnicki, git, Guy Rouillier Andreas Schwab <schwab@linux-m68k.org> writes: > diff --git a/git-cvsimport.perl b/git-cvsimport.perl > index bbf327f..046fe32 100755 > --- a/git-cvsimport.perl > +++ b/git-cvsimport.perl > @@ -249,6 +249,8 @@ sub conn { > > # if username is not explicit in CVSROOT, then use current user, as cvs would > $user=(getlogin() || $ENV{'LOGNAME'} || $ENV{'USER'} || "anonymous") unless $user; > + # Normalize hostname for lookup in .cvspass > + $serv = lc $serv; > my $rr2 = "-"; > unless ($port) { > $rr2 = ":pserver:$user\@$serv:$repo"; > @@ -263,6 +265,8 @@ sub conn { > # :pserver:cvs@mea.tmt.tele.fi:/cvsroot/zmailer Ah<Z > while (<H>) { > chomp; > + # FIXME: entries without version prefix > + # may need to be normalized > s/^\/\d+\s+//; > my ($w,$p) = split(/\s/,$_,2); > if ($w eq $rr or $w eq $rr2) { If I correctly recall what I found out from cvs's changelog while looking at http://thread.gmane.org/gmane.comp.version-control.git/163979/focus=167178 I think the versioned entries are already downcased, so the above, including the "FIXME", looks correct. As I wrote in another message in that thread, I think this codepath should be refactored a bit better so that it can handle subtle differences between versions and implementations of cvs itself, and also these versioned entries. A good first step might be to separate out the body of the innermost loop we see here that process one entry from the cvspass file into a helper function. Can you give an eyeball on the update of 077aac1 (Look for password in both CVS and CVSNT password files., 2011-02-18) posted by Guy Rouillier today and help testing it, and put this fix on top that? Thanks. ^ permalink raw reply [flat|nested] 8+ messages in thread
end of thread, other threads:[~2011-04-29 16:34 UTC | newest] Thread overview: 8+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2011-04-28 20:59 cvsimport does not work with passwords ? Marcin Wiśnicki 2011-04-28 21:03 ` Marcin Wiśnicki 2011-04-28 21:35 ` Marcin Wiśnicki 2011-04-28 22:45 ` Jeff King 2011-04-28 22:50 ` Marcin Wiśnicki 2011-04-29 11:33 ` Andreas Schwab 2011-04-29 13:09 ` [PATCH] git-cvsimport: normalize hostname for password lookup Andreas Schwab 2011-04-29 16:33 ` Junio C Hamano
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).