如何从命令行将 svn+ssh 与 Tortoise SVN 一起使用 [英] How to use svn+ssh with Tortoise SVN from the command line

查看:16
本文介绍了如何从命令行将 svn+ssh 与 Tortoise SVN 一起使用的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在使用 TortoiseSvn 的 Windows 7 工作站上尝试使用以下语法签出存储库时遇到问题:

I'm having trouble trying to checkout a repo using the following syntax on a Windows 7 workstation with TortoiseSvn:

svn co svn+ssh://user@ip/repo .

我为测试此问题所做的工作:

What I've done to test this issue:

  • 将 TortoiseSvn 的网络设置修改为指向 ..TortoisePlink.exe
  • 成功建立到目标机器的 ssh 连接,没有问题
  • 已成功从运行 Ubuntu 和 OpenSsh 的工作站签出存储库

当我尝试从 Windows 7 工作站上的命令行执行上述语法时,出现错误:

When I try to do the above syntax from the command line on the Windows 7 workstation I get the error:

svn: E720087: Unable to connect to a repository at URL 'svn+ssh:///user@ip/repo'
svn: E720087: Can't create tunnel:The parameter is incorrect.

有趣的是,如果我使用 tortoise gui 浏览到 repo,我可以成功打开并查看 repo.但是为了编写脚本,我需要从命令行执行此操作.

Interestingly, if I use the tortoise gui to browse to the repo I can successfully open and check out the repo. But I need to do it from the command line for scripting purposes.

有什么建议吗?

推荐答案

要使 svn+ssh 与 Tortoise 一起工作,请确保将 %SVN_SSH% 设置为您的 ssh 客户端(可能来自 plink.exeTortoise 或 Putty)并且路径必须用正斜杠 / 或转义反斜杠 \ 编写.

For svn+ssh to work with Tortoise, make sure %SVN_SSH% is set to your ssh client (probably plink.exe from Tortoise or Putty) and the path must be written either with forward slashes / or with escaped backslashes \.

尝试在转义反斜杠的同时使用 plink 的绝对路径设置 %SVN_SSH%,例如 C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe 而不是 ..TortoisePlink.exe

Try to set %SVN_SSH% with the absolute path of plink while escaping the backslashes, something like C:\Program Files\TortoiseSVN\bin\TortoisePlink.exe instead of ..TortoisePlink.exe

这篇关于如何从命令行将 svn+ssh 与 Tortoise SVN 一起使用的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆