通过 php ssh 加 svn
我试图通过 php 运行以下命令:
exec("svn export svn+ssh://svn@XXXXXX/var/svn/XXXX $OUTPUT/$value2");
但它每次都要求我输入密码。我有一个密钥存储在 svn 服务器上,我如何将我的私钥传递给这个脚本来使用?
I am trying to run the following command through php:
exec("svn export svn+ssh://svn@XXXXXX/var/svn/XXXX $OUTPUT/$value2");
But it asks for my password each time. I have a key stored on the svn server, how can I pass pass my private key to this script to use?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
![扫码二维码加入Web技术交流群](/public/img/jiaqun_03.jpg)
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
存储在服务器中的密钥是运行该脚本的用户名下的吗?
通常,当您登录 IE 时,您会以“bob”身份登录。然而,当PHP执行时,它是作为WWW执行的;确保为正确的用户存储密钥。
is the key which is stored in the server under the user whom is running that script?
IE normally when you log in you're logged in as "bob". However when PHP is executed, it's executed as WWW; make sure the key is stored for the proper user.