info-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: authorisation failed in CVSweb while downloading...


From: Mark D. Baushke
Subject: Re: authorisation failed in CVSweb while downloading...
Date: Fri, 30 Jan 2004 10:59:39 -0800

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Gurpreet Singh (SCM) <address@hidden> writes:

> The patch ( as defined ) in your mail, Is that a complete and only patch
> described.

Yes. It was against an old version of cvsweb I had laying around, but I
could not find it on the web where it was orignally downloaded... It
would be applied with the 'patch' command. Or, if your version of cvsweb
was different, it should have given you the clues needed to find the
general part of the code in your version and fix it. There should be
only one place where $doCheckout is being set in the code.

So, if you already have a cvsweb that you want to patch, then you will
want to patch the location in the script that parses the $CheckoutMagic
part of the URL and ensure that it trims the leading '/' character from
the front of the $where part of the path.

> How do I do it / apply / in which file it needs to be added.

You will probably do better just to download a new version of cvsweb
that is more likely to work, such as the one from FreeBSD:

  
http://www.freebsd.org/cgi/cvsweb.cgi/~checkout~/projects/cvsweb/cvsweb.cgi?rev=HEAD&content-type=text/plain

Or, move to using the http://viewcvs.sourceforge.net project. If you do
the latter and you need to have old URLs work, you may end up wanting
some rewrite rules in your web server. If you are using apache (1.3.x),
you might be able to use something like the following:

           --------------- httpd.conf extract ---------------
# Munge URLs with the magical rewrite engine
RewriteEngine on

# Make sure that all requests to the root dir get redirected to
# viewcvs
RewriteRule ^/[^/]*$ /cgi-bin/viewcvs.cgi [PT]

# cvsweb is deprecated, all requests remapped to viewcvs.
# The parameter name for diff format changed, and the value for
# 'long colored diff' changed from 'H' to 'l'.
RewriteCond %{query_string} "(.*)(^|&|;)f=H(.*)"
  RewriteRule ^/cgi-bin/cvsweb/(.*)$ 
/cgi-bin/viewcvs.cgi/$1?%1%2diff_format=l%3 [R,NE]
RewriteCond %{query_string} "(.*)(^|&|;)f=([hucs])(.*)"
  RewriteRule ^/cgi-bin/cvsweb/(.*)$ 
/cgi-bin/viewcvs.cgi/$1?%1%2diff_format=%3%4 [R,NE]

# change from invented mime-type to real one
RewriteCond %{query_string} (.*)content-type=text/x-cvsweb-markup(.*)
  RewriteRule ^/cgi-bin/cvsweb/(.*)$ 
/cgi-bin/viewcvs.cgi/$1?%1content-type=text/vnd.viewcvs-markup%2 [R,NE]

# for the bulk of the cases, a simple substitution works
# However, the "checkout magic" changed in viewcvs...
RewriteRule ^(.*)/~checkout~/(.*)$ $1/*checkout*/$2
RewriteRule ^/cgi-bin/cvsweb/(.*)$ /cgi-bin/viewcvs.cgi/$1 [R,NE]

           --------------- httpd.conf extract ---------------

which was created by Dirk Bergstrom.

Both cvsweb and viewcvs are not really part of the cvshome.org project,
and any problems you are having with them will largely depend on the
version of those programs you are using. All we can do here is try to
help you locate the problem and try to fix it.

        Good luck,
        -- Mark

> Regards
> Gurpreet S
> 
> -----Original Message-----
> From: Mark D. Baushke [mailto:address@hidden
> Sent: Tuesday, January 27, 2004 9:44 PM
> To: Gurpreet Singh (SCM)
> Cc: address@hidden
> Subject: Re: authorisation failed in CVSweb while downloading... 
> 
> 
> Hi Gurpreet,
> 
> Gurpreet Singh (SCM) <address@hidden> writes:
> 
> > Hi All,
> > 
> > Well I am facing a peculiar problem with CVSweb.
> > The error message (in a separate POp up window) being received while
> > clicking on the "download" button of a particular file is the following :
> > 
> > ______________________________________
> > Error
> > Error: Unexpected output from cvs co: cvs [checkout aborted]: Absolute
> > module reference invalid: `/Project1/Path1/trial.mcp' 
> > Check whether the directory /cvsRepo/CVSROOT exists and the script has
> > write-access to the CVSROOT/history file if it exists.
> > The script needs to place lock files in the directory the file is in as
> > well. 
> > _______________________________________
> > 
> > 
> > I have checked all the config files and the read / write access on the
> > CVSroot / repsitory.
> > Any specific access priveleges to be checked..  or any idea where the
> > approach should be like.
> > 
> > Regards
> > Gurpreet S
> 
> Hmmm... more fun using cvsweb....
> 
> You may find viewcvs.sourceforge.net to be a 'better' web interface to
> your repository.
> 
> The basic problem is that cvsweb is trying to
> 
>     cvs checkout -p -r<some-revision> /Project1/Path1/trial.mcp
> 
> using an absolute path for the Project1 module instead of a relative
> path like this:
> 
>     cvs checkout -p -r<some-revision> Project1/Path1/trial.mcp
> 
> I suspect that you will find the patch following my .signature to cvsweb
> (depending on which of the many various versions of cvsweb floating
> around are in use) will fix your problem as it properly removes the
> leading slash from module names.
> 
>       Good luck,
>       -- Mark
> 
> --- cvsweb~   2003-10-29 19:21:27.000000000 -0800
> +++ cvsweb    2004-01-27 01:14:51.928244000 -0800
> @@ -115,6 +115,7 @@ $where = defined($ENV{'PATH_INFO'}) ? $E
>  $doCheckout = ($where =~ /^\/$checkoutMagic/);
>  $where =~ s|^/($checkoutMagic)?||;
>  $where =~ s|/+$||;
> +$where =~ s|^/+||;
>  ($scriptname = $ENV{'SCRIPT_NAME'}) =~ s|^/?|/|;
>  $scriptname =~ s|/+$||;
>  if ($where) {
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.3 (FreeBSD)

iD8DBQFAGqmb3x41pRYZE/gRAnroAKCl6kQnc3XdqJZPu8EYH9UA7U/UnQCgqo3S
o6osDNCjuHv5fcUHQCKBojM=
=0iHA
-----END PGP SIGNATURE-----




reply via email to

[Prev in Thread] Current Thread [Next in Thread]