【发布时间】:2014-03-23 00:38:31
【问题描述】:
昨天我发现了 git 这样的东西的存在。我需要使用 ssh 访问远程存储库。我使用了命令$ git clone git@forest.com:stranger@gmail.com。但是当我使用它时,它说它正在克隆,然后需要密码。虽然我在 ~/.ssh 中有秘密和公开密钥。而且我还有一个配置文件,看起来像这样:
Host forest
User git
HostName forest.com
Port 22
IdentityFile ~/.ssh/<stranger@gmail.com>.key
你能否给我一个提示,我如何访问这个远程存储库以及为什么我需要这个配置文件,我可以用它做什么?
【问题讨论】: