Well, I got to the core of what was happening by attempting several
ways of svn list "ing" the repo on my box.  The problem was that, as I
mentioned earlier, users who access svn on my box do so via ssh, and
they authenticate using an ssh key.  Their public keys on my box
contain the line "command=/usr/local/bin/svnserve -t -r
"/Users/Shared"" to the key).  Well, the "/Users/Shared allows the user
to access the svn repo via:

svn+ssh://[EMAIL PROTECTED]/repository

...rather than...

svn+ssh://[EMAIL PROTECTED]/Users/Shared/repository

The path I put in my deploy.rb to the repo was:

svn+ssh://[EMAIL PROTECTED]/MinPro/#{application}

(notice the absolute path is NOT specified).

Now, like I said, I could connect to the repo from the deployment
server just fine, and this was because when I did so, the public key
was matched up and the key hack took effect.

But the problem lay in the local revision query.  When I'd try to
connect to the repository via command line "svn list..." with the
shortened path, it would fail, saying the repo didn't exist.  So I
tried it with the full path and it worked.  So, what I did to fix it
was remove the part of the public key hack where it allowed users to
type in a shortened repo path when checking in and out, so that the
connection path would be the same for remote users(full paths only) AS
WELL AS a local user (me), and changed the repository path in deploy.rb
to the full path:

svn+ssh://[EMAIL PROTECTED]/Users/Shared/MinPro/#{application}

Never thought I'd say this, but worked like a charm.

Now I have to figure out why when I deploy, it looks like it's running
a command to check out to a folder, says "command finished", then turns
right around and deletes the folder it just created, tries to create a
symbolic link to the folder it just deleted, and then whines that it
doesn't exist anymore??  What sense does that make?




On Dec 14, 4:05 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
> It is possible to svn+ssh into your own box...but you have to make
> sure you've got everything configured to allow svn+ssh to your own
> box. I'm not an svn config guru, though, so I can't help you.
> Probably you'd have better luck with this kind of question on a
> subversion mailing list. If you're getting the same error using svn
> independently of capistrano, then it's probably not a capistrano-
> specific problem.
>
> - Jamis
>
> On Dec 14, 2006, at 1:35 PM, blakeage wrote:
>
>
>
> > I understand that, and I read that in my search for answers.  I know
> > the deployment server can access the repository.
>
> > But when I run, from my box:
> > svn list svn+ssh://[EMAIL PROTECTED]/MinPro/refprototype
>
> > ...it prompts for a password.  I type the password in, and it says:
> > subversion/svnserve/serve.c:1960: (apr_err=210005)
> > svn: No repository found in
> > 'svn+ssh://[EMAIL PROTECTED]/MinPro/refprototype'
>
> > That's the same repository path that I'm using to connect from the
> > deployment server.
>
> > Again, the repository is located on my box.  Perhaps it's not possible
> > to svn+ssh into your own box?
>
> > On Dec 14, 2:58 pm, Jamis Buck <[EMAIL PROTECTED]> wrote:
> >> Note that capistrano queries the repo from TWO locations:
>
> >> 1. First, it queries from your local host, where you are issuing the
> >> command from. It does this to query what the latest revision in the
> >> repository is. Once it knows the latest revision, it then proceeds
> >> with the deploy.
>
> >> 2. Second, it does an svn checkout from each target host, to deploy
> >> the code.
>
> >> Thus, your repository must be accessible from both your local host,
> >> as well as your remote host(s).
>
> >> - Jamis
>
> >> On Dec 14, 2006, at 12:05 PM, blakeage wrote:
>
> >>> I'm having a problem with Capistrano.  I'm deploying from my box
> >>> (which
> >>> is also the repository right now) as myself.  I have a user on my
> >>> box
> >>> called "webuser2", which has access to the repository.  I'm
> >>> deploying
> >>> to "deployserver" as user "webuser2".  On the repo box (my box), I
> >>> have
> >>> a ssh key for "webuser" that was created on "deployserver" (I've
> >>> put it
> >>> in "webuser2"'s .ssh directory as "authorized_keys").
>
> >>> My understanding of the deployment process is this:
> >>> Run deploy as whatever user
> >>> Cap checks the repository (where ever you specified) for latest
> >>> revision.  In my case, the repository is at:
> >>> svn+ssh://[EMAIL PROTECTED]/MinPro/#{application}
> >>> Then Cap connects to the deployment server "somedeployserver" via
> >>> SOME
> >>> AUTHENTICATION METHOD, with user:
> >>> "webuser2", which is defined in my deploy.rb file:
> >>> set :user, "webuser2"
> >>> set :password, "XXXXX"
>
> >>> Then from the deployment server, Cap issues an svn checkout from the
> >>> repository:
> >>> svn -co svn+ssh://[EMAIL PROTECTED]/MinPro/#{application} ./whateverdir
>
> >>> What is happening in my case, is that I'm getting an error that
> >>> "svnserve: command not found" when I deploy.  The exact error lines
> >>> read:
> >>> * querying latest revision...
> >>> Password:
> >>> bash: line 1: svnserve: command not found
> >>> subversion/libsvn_ra_svn/marshal.c:255: (apr_err=210002)
> >>> svn: Connection closed unexpectedly
>
> >>> This, I've seen happen before when a user issues an svn+ssh
> >>> command to
> >>> the repo server, but for some reason their key does not match up
> >>> with
> >>> the key on the server, so the ssh key hack
> >>> (command="/usr/local/svn.wrapper") in their public key doesn't get
> >>> called.  If you're not aware, you can put a hack in a user's public
> >>> key
> >>> that calls a shell script (in my case svn.wrapper), which simply
> >>> sets a
> >>> umask and calls "svnserve -[options]...)
>
> >>> I'm fairly sure that when Cap connects to the repository from the
> >>> deployment server, it is not sending the "webuser2" 's private key.
> >>> However, if I log into the deployment server as "webuser2", and
> >>> issue
> >>> the command at the command line, "svn -co
> >>> svn+ssh://[EMAIL PROTECTED]/MinPro/#{application} ./somefolder"
> >>> I can check the project out fine.
>
> >>> So what I'm wondering is, why isn't the ssh key getting from the
> >>> deployment server to the repo server?  How does Cap connect to the
> >>> deployment server, and how would that affect it's SSH authentication
> >>> with the repository?
> 
> >>> Thanks


--~--~---------~--~----~------------~-------~--~----~
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/capistrano
-~----------~----~----~----~------~----~------~--~---

Reply via email to