如何在IntelliJ Windows中使用svn + ssh? [英] How to use svn+ssh in IntelliJ Windows?
问题描述
我们的SVN服务器仅允许ssh连接.如何在Windows上配置IntelliJ以使用svn + ssh连接到SVN服务器?
Our SVN server allows ssh connections only. How can I configure IntelliJ on Windows to connect to SVN server using svn+ssh?
推荐答案
要在Windows计算机上使用ssh连接到SVN,您将需要
In order to connect to SVN using ssh on a Windows machine, you will need to
- 生成ssh私钥并将其上传到服务器上用户允许的密钥.
- 创建一个保存的PuTTy会话以使用私钥文件.
- 下载TortoiseSVN Plink用作SSH隧道.
- 配置IntelliJ以使用TortoiseSVN连接到您的SVN服务器.
以下是这些步骤的详细信息.
Here are the details of these steps.
您可以使用 PUTTYGEN 生成私钥.
然后将密钥保存在用户主目录的.ssh
文件夹中.
Then save the key in the .ssh
folder in the user home directory.
如果您使用Windows 10,则可以在Windows上的Ubuntu上使用Bash生成并加载私钥.
If you have Windows 10, you can use Bash on Ubuntu on Windows to generate and load your private keys.
ssh-keygen -t rsa
这将生成文件~/.ssh/id_rsa
然后将密钥加载到服务器
Then load the key to the server
ssh-copy-id amr@example.com
最后一步是将生成的文件从Ubuntu子系统路径移动到Windows中的主目录.
The final step is to move the generated file from the Ubuntu subsystem path to your home directory in windows.
cp ~/.ssh/id_rsa /mnt/c/Users/amr/.ssh/
您仍然需要使用PUTTYGEN工具将密钥从OpenSSH
转换为PPK
格式.从该工具加载文件,然后再次以PPK格式保存私钥.
You still need to convert the key from OpenSSH
to PPK
format using the PUTTYGEN tool. From the tool load the file and then save the private key again in the PPK format.
在PuTTY中创建一个新会话以登录SVN服务器,并将SSH/Auth的设置更改为指向私钥文件
Create a new session in PuTTY for login into the SVN server and change the setting of SSH/Auth to point to the private key file
下载并安装 Tortoise SVN .它具有一个基于puTTY的名为TortoisePlink
的命令行工具.我们将使用plink
作为SVN的SSH隧道.
Download and install Tortoise SVN. It has a command line tool named TortoisePlink
which is based on puTTY. We will use plink
as the SSH tunnel for SVN.
转到文件/设置/版本控制/Subversion",然后选择"SSH设置"选项卡.
选择Subversion config
Go to File/Settings/Version Control/Subversion then select SSH settings tab.
Select Subversion config
确保将SSH隧道设置为$SVN_SSH ssh -q
然后如图所示将路径添加到TortoisPlink.确保跳过反斜杠.
make sure SSH tunnel is set to $SVN_SSH ssh -q
then add the path to TortoisPlink as in the picture. Make sure to skip backslashes.
那么,你很好.
这篇关于如何在IntelliJ Windows中使用svn + ssh?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!