How do I generate sql/civicrm_generated.mysql using bin/regen.sh file?
Try:

cp bin/setup.conf.txt bin/setup.conf


Then edit and fill in appropriate values in the setup.conf file before trying to run regen.sh.