Hydrogen vs. Battery Electric Cars

I'm still wondering about the fact that all Hydrogen is generated currently from fossil fuels. The problem isn't the energy carrier (battery vs hydrogen) but energy generation (renewable vs fossil) How is hydrogen produced by renewable sources?