svn checkout 无法通过 phing 工作
我目前正在尝试编写一个内部应用程序,以便只需单击一下即可将我们的项目部署到验收和生产服务器。 我们正在使用 phing 来完成此任务。
目前我在检查(或进行 svn 导出)该项目时遇到困难。我使用以下命令:
<exec command="svn checkout ${svn.host} ${svn.exportdir} --force --username server --password <password>" />
在普通命令行上,这完美地工作,但是由于主机使用 https,所以系统提示我接受证书。问题是似乎没有参数可以自动接受证书。
--trust-server-cert 也没有帮助,因为证书由于主机名不匹配而被拒绝,其中该参数仅绕过“CA 未知”错误。
关于如何查看(或导出、更新……)项目有什么想法吗?
I'm currently trying to write an internal application to be able to deploy our projects to acceptance and production servers with a single click.
We are using phing to accomplish this.
At the moment I'm having difficulty checking out (or doing an svn export) the project. I use the following command:
<exec command="svn checkout ${svn.host} ${svn.exportdir} --force --username server --password <password>" />
on a normal command line this works perfectly, however i get prompted to accept a certificate because the host uses https. Problem is there seems to be no parameter to automatically accept a certificate.
the --trust-server-cert doesn't help either, becase the certificate is rejected due to a hostname mismatch, where the parameter only bypasses a "CA is unknown"-error.
Any ideas on how I can check out (or export, update, ...) the project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
在 svn 服务器 HTTPS 地址上执行
wget
并永久接受证书。然后按 p 接受证书。
我还在 PHP 文档中添加了一些关于证书问题:
只需在命令行上调用
并接受证书即可。
当执行Phing命令的用户不是root时仍然可能出现问题,那么你必须以运行Phing命令的用户身份执行此命令:
Do a
wget
on the svn servers HTTPS adress and accept the certificate permanently.And then press p to accept the cert.
I also added some hints to the PHP documentation about the problems with certificates:
Simply call
on your command line and accept the cert.
There could be still a problem when the user which executes the Phing command is not root, then you have to execute this command as the user which runs the Phing command:
只需以将要运行 phing 的用户身份进行一次手动检查即可。如果需要,您可以查看
/dev/null
。一旦您接受了证书,它将保持接受状态(如果该用户有.subversion
目录来存储它)。顺便说一句,您通过和
ExecTask
使用svn
命令行界面而不是仅使用SvnCheckoutTask
?Just do one manual checkout as the user that will be running phing. You can checkout to
/dev/null
if you want to. Once you have accepted the certificate, it will stay accepted (if that user has a.subversion
directory to store it).By the way, any specific reason why you are using the
svn
commandline interface through andExecTask
instead of just using theSvnCheckoutTask
directly?