使用 Visualsvn 进行 ssh 隧道
我被要求为 Visual Studio 2008 设置 VisualSVN。
由于防火墙限制和服务器配置。我需要使用ssh 隧道。
我的问题是这样的:
本地计算机需要通过 ssh 连接到网关计算机,然后连接到 Subversion 服务器,因此
Local machine ---{ssh}--- gateway ---{ssh}-- Subversion server
我不确定执行此操作的正确过程。
看来我必须使用 plink 启动 ssh 进程来打开本地端口并将其转发到远程 Subversion 服务器。
例如:plink user@gateway -L 22:192.168.1.1:22
然后,当 VisualSVN 启动时,它使用 Tortoiseplink 使用 与 Subversion 服务器建立实际连接svn+ssh://username@localhost:22/myrepo
这看起来非常非常笨重。
首先,需要几个步骤来设置连接。
其次,我需要运行plink,这会在桌面上留下命令提示符(混乱=恶心)。
最后,我需要使用两个不同的程序来做同样的事情。 (plink + tortoiseplink)
问题是 tortoiseplink 不在后台运行。一旦我连接到 ssh 网关并输入密码,它就会再次关闭。所以我不能用它来创建初始连接。
如果我在 VisualSVN 中使用 plink 而不是 tortoiseplink,那么我永远不会收到输入密码的提示。因此,它只是在打开命令提示符且没有密码请求的情况下挂起。
是否有一种方法可以设置 VisualSVN,以便所有事情都在一个命令行中进行?
我四处寻找一种合适且干净的方法来从 VisualSVN 到远程服务器建立隧道,但发现的很少。这一切要么假设一跳(不像我的那样是两跳),要么掩盖所有困难。
VisualSVN 如何处理不同服务器上的多个存储库? 看来您需要对每个项目使用相同的 ssh 命令行,这意味着只有一个存储库。或者至少只有一台主机!
I have been asked to setup VisualSVN for Visual Studio 2008.
Due to firewall restrictions and server configuration. I need to use ssh tunneling.
My problem is this:
The local machine needs to connect to a gateway machine via ssh then connect to the Subversion server so
Local machine ---{ssh}--- gateway ---{ssh}-- Subversion server
I am not exactly sure of the correct process to do this.
It appears that I must start a ssh process using plink to open a local port and forward that to the remote subversion server.
E.g.: plink user@gateway -L 22:192.168.1.1:22
Then when VisualSVN starts it uses Tortoiseplink to make the actual connection through to the Subversion server using svn+ssh://username@localhost:22/myrepo
This seems very very clunky.
Firstly it needs several steps to setup the connection.
Secondly I need plink running which leaves a command prompt on the desktop (clutter = yuck).
Lastly I need to use two different programs that do the same thing. (plink + tortoiseplink)
The problem is that tortoiseplink doesn't run in the background. As soon as I connect to the ssh gateway and enter the password it closes again. So I can't use it to create the initial connection.
If I use plink instead of tortoiseplink in VisualSVN then I never get prompted for the password. So it just hangs with an open command prompt and no password request.
Is there a way to setup VisualSVN so that everything happens in one command line?
I have searched high and low for a suitable and clean method to tunnel from VisualSVN to the remote server and have found very little. It all either assumes one hop (not two like mine) or it glosses over all the hard bits.
How does VisualSVN deal with multiple repositories on different servers? It appears you need to use the same ssh commandline for every project which means only one repository. or at least only one host!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
没有使用过 VisualSVN,但是 TortoiseSVN 的说明非常简单。
即使您不使用 TortoiseSVN,它至少也可以让您测试链接和存储库。
Haven't used VisualSVN, but the instructions for TortoiseSVN are very simple.
It will at least let you test the link and the repository even if you don't use TortoiseSVN.