Executing an HTTPS SVN command line query using exec () in PHP

I have a team that I created that makes an information call in an SVN repository stored in a hosted SVN service. Here is an example:

exec('svn info https://myrepo.svn.beanstalkapp.com/project/name/folder 2>&1', $output, $returnStatus); if ($returnStatus) { print_r($output); } 

I get the answer:

 Array ( [0] => Authentication realm: SVN [1] => Password for 'apache': Authentication realm: SVN [2] => Username: svn: PROPFIND request failed on '/project/name/folder' [3] => svn: PROPFIND of '/project/name/folder': authorization failed (https://myrepo.svn.beanstalkapp.com) ) 

I run the script in a field on which there is Plesk. It starts completely locally, so I suspect that this is a configuration problem (for which I cannot find answers to questions on the Internet).

I don’t know how to make the Apache user have access to the authentication area - I think the problem is at hand.

+4
source share
1 answer

You need to specify the login credentials - --username and --password (or make sure that the credentials are stored in ~ / .subversion for the user running the application)

And why don't you use some client library like phpsvnclient - http://code.google.com/p/phpsvnclient/

+2
source

All Articles