'How to interact with current running command cell in google colab?

Here what the cell looks like

Cloning into 'XYZ'...
The authenticity of host 'github.com (192.**.###.113)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJIGOCWGl7E1spRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)? 

How to give yes or no to this running command cell?



Solution 1:[1]

There's no easy way to interact with the process once it's running; two options:

  1. Pass yes to the program from the shell, eg echo 'yes' | git ... or just y | git ... (if y works as a response).
  2. If possible, clone via an https path instead of a git one.

Solution 2:[2]

Passing "-y" or "--yes" along with the command works.

For example:

!pip uninstall lightgbm --yes

Solution 3:[3]

I made a code line after the question and then typed: --y

it worked!

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Craig Citro
Solution 2 christorreslugo
Solution 3 Etezadi