开发者

svn checkout not working via phing

开发者 https://www.devze.com 2023-03-19 22:54 出处:网络
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.

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 certific开发者_如何学Pythonate.

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?


Do a wget on the svn servers HTTPS adress and accept the certificate permanently.

$ wget https://svn.mydomain.com/repos

And then press p to accept the cert.


I also added some hints to the PHP documentation about the problems with certificates:

Simply call

svn checkout https://svn.mydomain.com/repos --force --username server --password iMPs+nana0kIF

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:

su wwwrun wget https://... 
su wwwrun svn checkout https://...


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 and ExecTask instead of just using the SvnCheckoutTask directly?

0

精彩评论

暂无评论...
验证码 换一张
取 消