Woes executing SVN from CGI
From: David W. Wilson <wilson.d_at_anseri.com>
Date: 2007-10-10 19:23:00 CEST
I am tasked with setting up a web-based build server, which is to checkout
I installed CollabNet SVN Server on the build server, since it includes both
Once I got ActivePerl CGI scripts configured on the build server, I wrote a
--doit.cgi---------------------------------------------------------------
# Print HTTP header
print "Content-type: text/plain; charset=iso-8859-1\n\n";
# Command to get the contents of a SVN file on SVN server
my $command = '"c:/Program Files/CollabNet Subversion Server/svn" "cat"
# Run the command
my $output = `$command 2>&1`;
# Print the command and output
print "Command:\n$command\n\nOutput:\n$output\n";
# Finish happily
exit 0;
------------------------------------------------------------------------
When I run this script manual from the command line in a command prompt
------------------------------------------------------------------------
> perl doit.cgi
Content-type: text/plain; charset=iso-8859-1
Command:
"c:/Program Files/CollabNet Subversion Server/svn" "cat"
Output:
This is a test.
------------------------------------------------------------------------
This is the correct output, and confirms that the command syntax is correct.
But when I run the very same doit.cgi as a CGI script, I see the following
------------------------------------------------------------------------
> http://buildhost/cgi-bin/doit.cgi
Command:
"c:/Program Files/CollabNet Subversion Server/svn" "cat"
Output:
svn: PROPFIND request failed on '/svn/src/project/wilsond/test.txt'
svn: PROPFIND of '/svn/src/project/wilsond/test.txt': 403 Forbidden
------------------------------------------------------------------------
The problem is clearly SVN server authentication. For the command line
------------------------------------------------------------------------
123.456.789.10 - anseri\\wilsond [10/Oct/2007:10:09:03 -0400] "PROPFIND
123.456.789.10 - anseri\\wilsond [10/Oct/2007:10:09:03 -0400] "PROPFIND
123.456.789.10 - anseri\\wilsond [10/Oct/2007:10:09:03 -0400] "PROPFIND
123.456.789.10 - anseri\\wilsond [10/Oct/2007:10:09:03 -0400] "GET
------------------------------------------------------------------------
while for the CGI (failed) run, it logs:
------------------------------------------------------------------------
123.456.789.10 - - [10/Oct/2007:10:14:45 -0400] "PROPFIND
123.456.789.10 - - [10/Oct/2007:10:14:45 -0400] "PROPFIND
123.456.789.10 - "" [10/Oct/2007:10:14:45 -0400] "PROPFIND
------------------------------------------------------------------------
In the latter case, it appears that no credentials are passed to the SVN
Because of this issue, I cannot rebuild the replicator entree templates, so
Has anyone run into this problem, and if so, how do credential SVN CLI
|
This is an archived mail posted to the Subversion Users mailing list.
This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.