【问题标题】:Format of ssh configssh 配置格式
【发布时间】:2014-08-22 17:14:23
【问题描述】:

我遵循了一个教程,因此我可以在同一台机器上拥有两个单独的 git hub 用户,我在 ssh 文件夹中创建了一个配置:

#Default GitHub
Host <span class="skimlinks-unlinked">github.com</span>
HostName <span class="skimlinks-unlinked">github.com</span>
User git
IdentityFile ~/.ssh/id_rsa
Host github-panthro
HostName <span class="skimlinks-unlinked">github.com</span>
User git
IdentityFile ~/.ssh/id_rsa_panthro

但是现在当我尝试使用 ssh 时,我得到了错误:

config line 3: garbage at end of line; "class".

我已经清理了删除空格的类,但错误仍然存​​在。

【问题讨论】:

  • 请发布您所关注的教程的链接
  • 我真的很确定&lt;span class=...&gt; 不应该在那里。您是否错误地将其复制粘贴到/从您的 ssh 配置文件中?

标签: git github ssh


【解决方案1】:

按如下方式删除 Span,它应该可以工作。我有类似的配置文件。

Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa
Host github-panthro
HostName github.com
User git
IdentityFile ~/.ssh/id_rsa_panthro

【讨论】:

    猜你喜欢
    • 2021-06-24
    • 2014-11-04
    • 1970-01-01
    • 2022-06-28
    • 1970-01-01
    • 2012-04-11
    • 2013-11-17
    • 2015-11-11
    • 1970-01-01
    相关资源
    最近更新 更多