SVN + SSH,不必每次都执行ssh-add吗? (苹果系统) [英] SVN+SSH, not having to do ssh-add every time? (Mac OS)

查看:208
本文介绍了SVN + SSH,不必每次都执行ssh-add吗? (苹果系统)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我知道答案就在那里,但是我相当笨拙,如果面对我,可能无法识别解决方案.

I know the answer is out there, but I'm pretty Unix-dumb and probably wouldn't recognize the solution if it hit me in the face.

我在Mac上,通过SSH隧道连接到SVN服务器.每次我想连接到SVN服务器时都必须ssh-add privateKey.txt(Cornerstone和Xcode都在连接到SVN).

I'm on a Mac, connecting to a SVN server via SSH tunneling. I have to ssh-add privateKey.txt every time I want to connect to the SVN server (Both Cornerstone and Xcode are connecting to SVN).

有没有一种方法可以将密钥保存"在某个地方,所以我不必每次都这样做?将其添加到我的钥匙串吗?一些配置文件?启动脚本?

Is there a way to "save" the key somewhere so I don't have to do this every time? Add it to my Keychain? Some config file? Start up script?

推荐答案

首先,将私钥文件移动到~/.ssh中.这不是严格必要的,但这是此类事情的标准位置.

First, move your private key file into ~/.ssh. This is not strictly necessary but it's the standard place for such things.

然后运行ssh-add -K ~/.ssh/privateKey.txt.如有必要,它将提示您输入密码,然后将其添加到钥匙串中.

Then run ssh-add -K ~/.ssh/privateKey.txt. It'll prompt for your passphrase if necessary, then add it to your Keychain.

在那之后,您无需执行任何其他操作.在此处中可以找到稍长的说明.

After that, you shouldn't have to do anything else. A slightly longer explanation is available here.

这篇关于SVN + SSH,不必每次都执行ssh-add吗? (苹果系统)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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