svn checkout 无法通过 phing 工作 [英] svn checkout not working via phing
问题描述
我目前正在尝试编写一个内部应用程序,以便只需单击一下即可将我们的项目部署到验收和生产服务器.我们正在使用 phing 来完成此操作.
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.
目前我在检查(或执行 svn 导出)项目时遇到困难.我使用以下命令:
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>" />
在普通命令行上,这可以完美运行,但是由于主机使用 https,我收到提示接受证书.问题是似乎没有自动接受证书的参数.
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.
--trust-server-cert 也无济于事,因为证书因主机名不匹配而被拒绝,其中参数仅绕过CA 未知"错误.
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?
推荐答案
在 svn 服务器的 HTTPS 地址上做一个 wget
并永久接受证书.
Do a wget
on the svn servers HTTPS adress and accept the certificate permanently.
$ wget https://svn.mydomain.com/repos
然后按 p 接受证书.
只需调用
svn checkout https://svn.mydomain.com/repos --force --username server --password iMPs+nana0kIF
在您的命令行上并接受证书.
on your command line and accept the cert.
当执行Phing命令的用户不是root时可能还是有问题,那么你必须以运行Phing命令的用户身份执行这个命令:
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:
su wwwrun wget https://...
su wwwrun svn checkout https://...
这篇关于svn checkout 无法通过 phing 工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!