'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:
- Pass
yesto the program from the shell, egecho 'yes' | git ...or justy | git ...(ifyworks as a response). - If possible, clone via an
httpspath instead of agitone.
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 |
