git-svn 在哪里保存 ssh 凭据?
我正在使用 git-svn 开发托管在 SVN+SSH 存储库上的代码。我不必每次 dcommit/update/rebase 时都在服务器上输入 ssh 密码,因此我假设它已缓存在某处。
我的凭据保存在哪里?在 .git 目录中,还是在我的主目录中的某个点文件中全局?
我问这个问题是因为我的 git 存储库在我的主目录上是公共可读的(我们的实验室有家庭可读政策),而且我担心这可能会将我的 ssh 凭据泄露给所有实验室。
谢谢。
I am using git-svn to develop code that is hosted on a SVN+SSH repository. I do not have to input my ssh password on the server every time I dcommit/update/rebase, so I assume it is cached somewhere.
Where are my credentials saved? Inside the .git directory, or globally in some dot-file in my home directory?
I ask because my git repository is public-readable on my home directory (we have a homes-are-readable policy in our laboratory), and I am afraid that this might leak my ssh credentials to all the lab.
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
正如 Git-Svn 是否存储 Svn 密码?中所述,它们存储在
~/.subversion
,所以只要你的主目录本身不是公共可读的,你就不应该有问题(尽管我刚刚更彻底地阅读了你的最后一行,你可能有一个问题)。As noted in Does Git-Svn Store Svn Passwords?, they are stored in
~/.subversion
, so as long as your home directory itself is not public readable you shouldn't have a problem (though as I've just read your last line a bit more thoroughly, you may have a problem).您是否已将 SSH 服务器配置为使用基于密钥的身份验证?您的私钥(受密码保护与否)可能位于
~/.ssh/id_rsa
或~/.ssh/id_dsa
中(公钥是.pub
文件与它们关联)。您绝对应该保护这些目录,尽管在大多数情况下,如果其他人(root 除外)可以读取它们,ssh
甚至不会让它工作。Have you configured your SSH server to use key-based authentication? It's likely that your private key (password protected or not) is in
~/.ssh/id_rsa
or~/.ssh/id_dsa
(the public key being the.pub
file associated with them). You should definitely protect those directories, although, in most cases,ssh
won't even let it work if they're readable by someone else (other than root).