【问题标题】:Mac vs Linux (Ubuntu) .ssh config for githubMac 与 Linux (Ubuntu) .ssh 为 github 配置
【发布时间】:2014-10-13 20:30:44
【问题描述】:

我在 Mac OS X 上 /Users/andi/.ssh/config 有以下配置:

Host github
    HostName github.com
    IdentityFile "~/.ssh/githubik"
    IdentitiesOnly yes

而且我可以轻松轻松地运行git clone git@github:andilab/mbf.git

我在 Ubunut(EC2 上的 14.04)上尝试了相同的配置。配置在/home/ubuntu/.ssh 中,当我运行git clone git@github:andilab/mbf.git 时,我得到:

Cloning into 'mbf'...
ssh: Could not resolve hostname github: Name or service not known
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

【问题讨论】:

  • git:github_.com_:...
  • @bmargulies 这不是原因!阅读答案,并考虑不要用-points惩罚我......

标签: linux macos git github ssh


【解决方案1】:

好吧,我知道在 SO 上回答自己的问题很糟糕,但也许它会对某人有所帮助。我在服务器上 sudo-ing,所以ubuntu 用户的配置在以root 播放时不被考虑。

解决方案:为正确的用户提供配置,一切正常。

【讨论】:

    猜你喜欢
    • 2019-06-27
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2013-04-13
    • 2011-03-14
    • 2022-09-30
    相关资源
    最近更新 更多