【问题标题】:Answer "yes" to terminal on Google Colaboratory在 Google Colaboratory 上对终端回答“是”
【发布时间】:2018-07-20 10:36:00
【问题描述】:

我正在尝试使用 Google Colaboratory 从 Github 克隆,我使用的命令是:

!git clone git@github.com:CliMT/climt.git

但我得到以下信息:

Cloning into 'climt'...
The authenticity of host 'github.com (192.30.255.112)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?

但由于这是 Google Colaboratory,我无法在终端输入“是”。

我能做什么?

谢谢!

【问题讨论】:

    标签: python github google-colaboratory


    【解决方案1】:

    如果您只需要公共读取访问权限,您可以将 SSH 访问权限替换为 https: !git 克隆https://github.com/CliMT/climt.git

    如果您使用 SSH 是因为您计划从 colaboratory 运行时写入该 github 存储库,那么您必须手动设置 SSH 密钥和可能的 known_hosts 文件。 或者使用https://pexpect.readthedocs.io/en/stable/之类的脚本输入“是”

    (FTR 请注意警告不是特定于实验室的:https://help.github.com/articles/testing-your-ssh-connection/

    【讨论】:

      【解决方案2】:

      错误:

      !git clone git@github.com:CliMT/climt.git
      

      在 jupyter notebook 中使用:

      !git clone https://github.com/CliMT/climt.git
      

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-06-06
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2020-06-16
        • 2019-07-14
        相关资源
        最近更新 更多