There are several ways to do it depending on how bad it is.
If it’s not too bad throw a lenght of chain, some big nuts and bolts and anything else solid you may have that will fit in the hole, leave a bit of petrol in there, close the lid tightly and then shake hell out of it. Repeat as necessary.
If it still looks like there are flakey bit’s then either get another one or use a sealant. When I was in the USA we used to use one called „Petseal“ (I think) but you can buy the stuff in other countries too, will probably be called something else though. This total seals out the rust and esentially leaves you with a fiberglass inside to your tank. You need to take the tap out for this though and for that you’ll need the proper tool (they’re cheap though).