gpt4 book ai didi

php - 在 PHP 中使用 exec() 发出 HTTPS SVN 命令行请求

转载 作者:可可西里 更新时间:2023-10-31 23:34:15 24 4
gpt4 key购买 nike

我创建了一个命令,该命令对存储在托管 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 用户能够访问身份验证领域 - 我认为这就是手头的问题。

最佳答案

您需要提供登录凭据 - --username--password(或确保凭据存储在 ~/.subversion 中以供运行的用户使用应用程序)

为什么不使用像 phpsvnclient 这样的客户端库 - http://code.google.com/p/phpsvnclient/

关于php - 在 PHP 中使用 exec() 发出 HTTPS SVN 命令行请求,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7013755/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com