The best way to repair a gas leak is to immediately evacuate the premises and call the utility company or fire department to locate and repair the leak. Inexperienced people should never attempt to repair gas leaks due to the high risk involved.
If you must repair a gas leak, or if the leak is located on an external device such as a generator, turn off all the power and gas lines. Be sure to wear proper safety equipment. At a minimum, wear protective gloves and a safety gas mask rated for working with natural gas. Give the gas plenty of time to disperse in an open area. Natural gas is highly flammable, so failing to do this can result in severe injury or death. After some time has passed, remove the gas line covers, detach the line, and give any built-up gas time to disperse.
Afterwards, clean the line with acetone, and gently scuff the surface with sandpaper. Apply epoxy to the leak in order to plug it. Let the epoxy dry for the manufacturer's recommended amount of time. A long drying time is ideal. Finally, re-attach the line, and test it for further leaks. Once there are no more leaks, replace the covers.