SVN Subversion 使用显式缓存凭据
我试图在脚本中运行 SVN 命令,但该脚本作为已缓存 svn 用户名/密码凭据的系统服务启动。
我总是可以将用户名/密码参数放在命令中:
svn info --username bob --password pass
但我不想将用户名/密码放在文本文件中。
我发现我的缓存凭据(正常运行 svn 时)最终出现在此处:
C:\Documents and Settings\bob\Application Data\Subversion\auth\svn.simple\6ef188c2163f1ccc860a690b7ad21a15
有什么方法可以复制此缓存凭据文件到我的脚本所在的位置并显式调用该文件?
I am trying to run a SVN command in a script, but the script is launched as a system service that has cached svn username/password credentials.
I could always just put the username/password arguments in the command:
svn info --username bob --password pass
but I'd rather not have my username/password just sitting in a text file.
I've discovered that my cached credentails (when run svn normally) end up here:
C:\Documents and Settings\bob\Application Data\Subversion\auth\svn.simple\6ef188c2163f1ccc860a690b7ad21a15
Is there any way I could copy this cached credential file to where my script exists and just call that file explicitly?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
唔。根据手册,简单地复制缓存文件是行不通的:
您是否尝试过在运行脚本时设置用户名和密码?系统用户的凭据是否也会被缓存?
如果这种情况没有发生,我能看到的唯一方法就是像其他人一样调整脚本 - 但你可能已经考虑过这一点。
Hmm. According to the manual, simply copying across the cached files won't work:
Have you tried setting user name and password when running the script once? Don't the credentials get cached for the system user as well?
If that doesn't happen, the only way I can see is to tun the script as somebody else - but you've probably already considered that.