I think there are some missing options for username, password in the initialize method:
https://github.com/discourse/discourse/blob/master/script/bulk_import/discourse_merger.rb#L18-L23
If you’re still trying to get this work, try adding user:
and password:
options for both of those connections and see if that fixes it.