python - 向 Google Colaboratory 上的终端应答 "yes"

标签 python github google-colaboratory

我正在尝试使用 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,我不能在终端上输入"is"。

我能做什么?

谢谢!

最佳答案

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

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

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

关于python - 向 Google Colaboratory 上的终端应答 "yes",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48709520/

相关文章:

python - 使用 Apache Beam 将结果列添加到现有 BigQuery 表

git - 如何在git中维护生产和开发分支?

github - 远程 : Repository not found in GitHub pipeline

google-colaboratory - 在 Google Colab 上设置 MLflow

python - 主脚本中的 cx_Freeze python 错误

python - PIL : pasting an image onto another image, 计算位置

javascript - 如何使用Python映射数组

git - 是功能分支 merge 到主分支中,还是相反?

python - 如何从笔记本单元终止当前的 colab session

python - 如何在 Google Colab 上安装 nvidia apex