Do you need good credit to buy a house?

Yes, in order to obtain a mortgage you will be required to have a good credit record.