The electricity could be produced by nuclear power. The Liquid Fluoride Thorium Reactor (LFTR) seems promising,.
Well, O. K., I could go with nuclear power to produce electricity; try to get over the regulatory hurdles put in the way by the enviro-nuts. I wonder what the cost-benefit ratio of producing hydrogen (and building the corresponding necessary infrastructure) relative to natural gas would be?