Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

CVS pserver "no such repository" error

1,598 views
Skip to first unread message

Jolly Roger

unread,
Feb 28, 2007, 3:40:40 PM2/28/07
to info...@nongnu.org
Hi folks,

I'm attempting to set up a cvs pserver on Mac OS X 10.4.

I've installed cvs-1.11.22.tar.gz with the config line:

/configure --without-gssapi --enable-client
--enable-password-authenticated-client --enable-server
--enable-encryption --with-cvs-admin-group=wheel

The resulting cvs binary is at /usr/bin/cvs.

I created the server repository with "sudo mkdir /usr/local/cvsroot/"
followed by a "sudo cvs -d /usr/local/cvsroot init". I verified that
"/usr/local/cvsroot/CVSROOT" was created.

I created this "/etc/xinet.d/cvspserver" startup file:

---
service cvspserver
{
disable = no
protocol = tcp
socket_type = stream
wait = no
user = root
server = /usr/bin/cvs
server_args = -f --allow-root=/usr/local/cvsroot pserver
groups = yes
flags = REUSE
}
---

Then I sent -HUP to xinetd.

When I do a "cvs -d :pserver:me@localhost:/usr/local/cvsroot login",
after the password prompt, I get a "no such repository" error:

---
cvs -d :pserver:me@localhost:/usr/local/cvsroot login
Logging in to :pserver: me@localhost:2401/usr/local/cvsroot
CVS password:
/usr/local/cvsroot: no such repository
---

I've tried this command with a bunch of different cvsroot paths (/,
/usr/local/, /cvsroot, etc.), with the same result.

I logged in with telnet and got:

---
# telnet localhost 2401
Trying 10.0.0.31...
Connected to localhost.
Escape character is '^]'.

cvs [pserver aborted]: bad auth protocol start:

Connection closed by foreign host.
---

Is there a way to get more verbose diagnostic info from the pserver?

I also created the file "/usr/local/cvsroot/CVSROOT/passwd" since none
existed, and added "me:dd.75ERde4GfD" (output from perl -e 'print crypt
"password", "dd"', "me" replaced with my actual username) - still the
same error.

I've searched Google (web and groups) for an hour or so reading various
posts and articles about the "no such repository" error, but haven't
found anything I haven't already tried.

Any ideas what i am doing wrong here?

--
JR

_______________________________________________
info-cvs mailing list
info...@nongnu.org
http://lists.nongnu.org/mailman/listinfo/info-cvs

Arthur Barrett

unread,
Feb 28, 2007, 8:08:40 PM2/28/07
to Jolly Roger, info...@nongnu.org
JR,

> When I do a "cvs -d :pserver:me@localhost:/usr/local/cvsroot login",
> after the password prompt, I get a "no such repository" error:
>

Create a repository first with "cvs -d :local:/usr/local/cvsroot init".

Regards,


Arthur

Larry Jones

unread,
Feb 28, 2007, 9:32:03 PM2/28/07
to Jolly Roger
Jolly Roger writes:
>
> cvs -d :pserver:me@localhost:/usr/local/cvsroot login
> Logging in to :pserver: me@localhost:2401/usr/local/cvsroot
> CVS password:
> /usr/local/cvsroot: no such repository

That error message means that the specified repository doesn't exactly
match an --allow-root= option in the pserver xinetd config, but they
certainly *look* the same in your posting. Check carefully for typos
and hidden control characters.

-Larry Jones

It doesn't have a moral, does it? I hate being told how to live my life.
-- Calvin

Jolly Roger

unread,
Feb 28, 2007, 9:40:32 PM2/28/07
to info...@nongnu.org
On 2007-02-28 19:07:59 -0600, "Arthur Barrett"
<arthur....@march-hare.com> said:

> JR,


>
>> When I do a "cvs -d :pserver:me@localhost:/usr/local/cvsroot login",
>> after the password prompt, I get a "no such repository" error:
>

> Create a repository first with "cvs -d :local:/usr/local/cvsroot init".

Thanks, but I did that already. From my original post:

> I created the server repository with "sudo mkdir /usr/local/cvsroot/"
> followed by a "sudo cvs -d /usr/local/cvsroot init". I verified that
> "/usr/local/cvsroot/CVSROOT" was created.

--

Jolly Roger

unread,
Feb 28, 2007, 11:40:33 PM2/28/07
to info...@nongnu.org
On 2007-02-28 20:31:27 -0600, lawrenc...@ugs.com (Larry Jones) said:

> Jolly Roger writes:
>>
>> cvs -d :pserver:me@localhost:/usr/local/cvsroot login
>> Logging in to :pserver: me@localhost:2401/usr/local/cvsroot
>> CVS password:
>> /usr/local/cvsroot: no such repository
>

> That error message means that the specified repository doesn't exactly
> match an --allow-root= option in the pserver xinetd config, but they
> certainly *look* the same in your posting. Check carefully for typos
> and hidden control characters.

That's what I've read everywhere. But I've retyped that line
letter-for-letter in the /etc/xinetd.d/cvspserver startup file more
than once. And there are no typos that I can see in that file or on the
command line.

I'm at a loss. It's got to be something else.

Jolly Roger

unread,
Feb 28, 2007, 11:41:30 PM2/28/07
to info...@nongnu.org
On 2007-02-28 21:44:42 -0600, Jolly Roger <jolly...@null.org> said:

> On 2007-02-28 20:31:27 -0600, lawrenc...@ugs.com (Larry Jones) said:
>
>> Jolly Roger writes:
>>>
>>> cvs -d :pserver:me@localhost:/usr/local/cvsroot login
>>> Logging in to :pserver: me@localhost:2401/usr/local/cvsroot
>>> CVS password:
>>> /usr/local/cvsroot: no such repository
>>
>> That error message means that the specified repository doesn't exactly
>> match an --allow-root= option in the pserver xinetd config, but they
>> certainly *look* the same in your posting. Check carefully for typos
>> and hidden control characters.
>
> That's what I've read everywhere. But I've retyped that line
> letter-for-letter in the /etc/xinetd.d/cvspserver startup file more
> than once. And there are no typos that I can see in that file or on the
> command line.
>
> I'm at a loss. It's got to be something else.

Something that may be worth noting... When I attempt, and fail, to log
in, this gets added to system.log:

Feb 28 21:56:36 macbookpro cvs: login refused for /usr/local/cvsroot

Larry Jones

unread,
Mar 1, 2007, 12:33:28 PM3/1/07
to Jolly Roger
Jolly Roger writes:
>
> That's what I've read everywhere. But I've retyped that line
> letter-for-letter in the /etc/xinetd.d/cvspserver startup file more
> than once. And there are no typos that I can see in that file or on the
> command line.
>
> I'm at a loss. It's got to be something else.

That's the only thing that causes that particular message. It's
possible that there's some kind of memory corruption that's messing up
the in-memory list of allowable roots. Try applying the following patch
and rebuilding -- that will log additional info in the syslog to help
diagnose the problem:

Index: root.c
===================================================================
RCS file: /cvsroot/cvs/ccvs/src/root.c,v
retrieving revision 1.60.2.16
diff -u -r1.60.2.16 root.c
--- root.c 7 Dec 2005 19:39:25 -0000 1.60.2.16
+++ root.c 1 Mar 2007 17:28:58 -0000
@@ -17,6 +17,7 @@
#include "cvs.h"
#include <assert.h>
#include "getline.h"
+#include <syslog.h>

/* Printable names for things in the current_parsed_root->method enum variable.
Watch out if the enum is changed in cvs.h! */
@@ -255,6 +256,9 @@
for (i = 0; i < root_allow_count; ++i)
if (strcmp (root_allow_vector[i], arg) == 0)
return 1;
+ syslog (LOG_DAEMON | LOG_INFO, "Unable to find root `%s' in:", arg);
+ for (i = 0; i < root_allow_count; ++i)
+ syslog (LOG_DAEMON | LOG_INFO, " `%s'", root_allow_vector[i]);
return 0;
}

-Larry Jones

Another casualty of applied metaphysics. -- Hobbes

Jolly Roger

unread,
Mar 1, 2007, 2:40:41 PM3/1/07
to info...@nongnu.org
On 2007-03-01 11:32:53 -0600, lawrenc...@ugs.com (Larry Jones) said:

> Jolly Roger writes:
>>
>> That's what I've read everywhere. But I've retyped that line
>> letter-for-letter in the /etc/xinetd.d/cvspserver startup file more
>> than once. And there are no typos that I can see in that file or on the
>> command line.
>>
>> I'm at a loss. It's got to be something else.
>
> That's the only thing that causes that particular message.

Okay I figured it out. I mostly had it set up right, but I needed to:

1. Create a new user named "cvs" ( I used UID 89).
2. Create a new group named "cvs" (also GID 89).
3. Do a "sudo chown -R cvs:cvs /usr/local/cvsroot".
4. Change the "/etc/xinetd.d/cvspserver" startup file to have "user = cvs".
5. Restart xinetd.
6. Make sure the "/usr/local/cvsroot/CVSROOT/passwd" file had a
"username:encpw:cvs" entry.

I used this Perl script to generate the password:

srand (time());
my $randletter = "(int (rand (26)) + (int (rand (1) + .5) % 2 ? 65 : 97))";
my $salt = sprintf ("%c%c", eval $randletter, eval $randletter);
my $plaintext = shift;
my $crypttext = crypt ($plaintext, $salt);

print "Plaintext: $plaintext\n";
print "Encrypted: $crypttext\n";

And now logins work correctly!

I'll have to post a nice tutorial on http://macosxhints.com about this
when I have time...

0 new messages