在 PHP 中使用 exec() 发出 HTTPS SVN 命令行请求
我创建了一个命令,用于对存储在托管 SVN 服务上的 SVN 存储库进行信息调用。下面是一个示例:
exec('svn info https://myrepo.svn.beanstalkapp.com/project/name/folder 2>&1', $output, $returnStatus);
if ($returnStatus)
{
print_r($output);
}
我得到的响应是:
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)
)
我正在装有 Plesk 的机器上运行脚本。它在本地运行最终,所以我怀疑这是一个配置问题(我似乎无法在网上找到任何答案)。
我不知道如何使 apache 用户能够访问身份验证领域 - 我相信这就是当前的问题。
I've got a command I've created that makes an info call to an SVN repository stored on hosted SVN service. Here's an example:
exec('svn info https://myrepo.svn.beanstalkapp.com/project/name/folder 2>&1', $output, $returnStatus);
if ($returnStatus)
{
print_r($output);
}
The response I get is:
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'm running the script on a box that has Plesk on it. It runs final locally so I suspect it's a configuration issue (which I can't seem to find any answers for online).
I don't know how to make the apache user be able to access the authentication realm - I believes that's the issue at hand.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您需要提供登录凭据 -
--username
和--password
(或者确保运行应用程序的用户的凭据存储在 ~/.subversion 中)为什么不使用一些客户端库,例如 phpsvnclient - http://code.google.com/p /phpsvnclient/
You need to provide the login credentials -
--username
and--password
( or make sure that the credentials are stored in ~/.subversion for the user running the app)And why don't you use some client library like phpsvnclient - http://code.google.com/p/phpsvnclient/