在 Google Colaboratory 上对终端回答 "yes"
Answer "yes" to terminal on 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,我无法在终端上输入 "yes"。
我能做什么?
谢谢!
如果您只需要 public-read 访问权限,您可以将 SSH 访问权限替换为 https:
!git 克隆 https://github.com/CliMT/climt.git
如果您使用 SSH 是因为您计划从 colaboratory 运行时写入那个 github 存储库,那么您将必须设置 SSH 密钥,可能还需要手动设置一个 known_hosts 文件.
或者使用 https://pexpect.readthedocs.io/en/stable/
之类的脚本输入 "yes"
(FTR 请注意警告不是特定于合作实验室的:https://help.github.com/articles/testing-your-ssh-connection/)
错误:
!git clone git@github.com:CliMT/climt.git
在 jupyter notebook 中使用:
!git clone https://github.com/CliMT/climt.git
我正在尝试使用 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,我无法在终端上输入 "yes"。
我能做什么?
谢谢!
如果您只需要 public-read 访问权限,您可以将 SSH 访问权限替换为 https: !git 克隆 https://github.com/CliMT/climt.git
如果您使用 SSH 是因为您计划从 colaboratory 运行时写入那个 github 存储库,那么您将必须设置 SSH 密钥,可能还需要手动设置一个 known_hosts 文件. 或者使用 https://pexpect.readthedocs.io/en/stable/
之类的脚本输入 "yes"(FTR 请注意警告不是特定于合作实验室的:https://help.github.com/articles/testing-your-ssh-connection/)
错误:
!git clone git@github.com:CliMT/climt.git
在 jupyter notebook 中使用:
!git clone https://github.com/CliMT/climt.git