opencrvs / opencrvs-core

A global solution to civil registration
https://www.opencrvs.org
Other
86 stars 68 forks source link

update-known-hosts.sh requires interactive shell but doesn't have it -> script gets stuck waiting on input #6590

Open n1koo opened 7 months ago

n1koo commented 7 months ago

When running yarn environment:init one of the final step is the automatic updating of hosts (update-known-hosts.sh)

However if the script has trouble doing what it hopes to do it asks for a retry here from a shell that doesn't exist as we use just exec in calling it

n1koo commented 7 months ago

Actually its not just the retry that is interactive, also ssh-keygen will ask for input, eg:


➜  opencrvs-nikoland git:(nikoland) ✗ infrastructure/environments/update-known-hosts.sh dummy.com
Host dummy.com not found in infrastructure/known-hosts
Host 199.59.243.225 not found in infrastructure/known-hosts
Error: Could not obtain SSH public key for dummy.com.
This usually means the domain is not reachable which might be because your VPN client is not running.
Do you want to try again (y/n)?```