VCS fails when connecting to unknown host via SSH
See original GitHub issueSteps to reproduce:
- Create a .repos file with ssh URLS
- Delete your
~/.ssh/known_hosts
file - Import the .repos file using vcs and watch the output look something like the following:
EEEThe authenticity of host ‘gitlab.com (35.231.145.151)’ can’t be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw. Are you sure you want to continue connecting (yes/no)? The authenticity of host ‘gitlab.com (35.231.145.151)’ can’t be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw. Are you sure you want to continue connecting (yes/no)? The authenticity of host ‘gitlab.com (35.231.145.151)’ can’t be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw. Are you sure you want to continue connecting (yes/no)? The authenticity of host ‘gitlab.com (35.231.145.151)’ can’t be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw. Are you sure you want to continue connecting (yes/no)? .The authenticity of host ‘gitlab.com (35.231.145.151)’ can’t be established. ECDSA key fingerprint is SHA256:HbW3g8zUjNSksFbqTiUWPWg2Bq1x8xdGUrliXFzSnUw. Are you sure you want to continue connecting (yes/no)? …
I tried typing “yes” a few times and more dots appeared, but then it hanged for quite a while and seemed to get stuck.
Possible Solutions:
- Add an arg to auto-accept the connection (possibly dangerous).
- Improve the user experience by presenting a (y/n) prompt that actually works.
Issue Analytics
- State:
- Created 4 years ago
- Comments:5 (3 by maintainers)
Top GitHub Comments
By default
vcs
runs concurrent commands for all repositories therefore it can’t usestdin
/ a prompt “that actually works”.Have you tried to operate on the repositories sequentially with the option
-w 1
?See #113 for a workaround. Please try the proposed change and comment if that works for your use case.