问题
I'm trying to clone from Github using Google Colaboratory, the command I'm using is:
!git clone git@github.com:CliMT/climt.git
But I get the following:
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)?
But since this is Google Colaboratory, I can't type "yes" to the terminal.
What can I do?
Thanks!
回答1:
If you only need public-read access you can replace SSH access with https: !git clone https://github.com/CliMT/climt.git
If you're using SSH because you have plans to write to that github repo from the colaboratory runtime then you'll have to set up SSH keys and probably a known_hosts file manually. Or script typing "yes" using something like https://pexpect.readthedocs.io/en/stable/
(FTR note the warning isn't colaboratory-specific: https://help.github.com/articles/testing-your-ssh-connection/)
回答2:
wrong:
!git clone git@github.com:CliMT/climt.git
In jupyter notebook using :
!git clone https://github.com/CliMT/climt.git
来源:https://stackoverflow.com/questions/48709520/answer-yes-to-terminal-on-google-colaboratory