SVN+SSH,不用每次都做ssh-add?(苹果系统) [英] SVN+SSH, not having to do ssh-add every time? (Mac OS)
问题描述
我知道答案就在那里,但我对 Unix 非常愚蠢,如果它打我的脸,我可能无法识别解决方案.
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 服务器(Cornerstone 和 Xcode 都连接到 SVN)时,我必须 ssh-add privateKey.txt
.
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屋!