Requirements vary from country to country and even within the same country. Here in Canada, I'm not allowed to do my own gas piping, but I understand that in some of the US states, the regulations are far more relaxed, and people connect their own gas fired water heaters all the time.
If anyone does attempt to do their own gas piping, at the very least ensure you paint every joint with a 50/50 mixture of liquid dish washing detergent and water. If any gas is leaking, it will blow bubbles and you'll be aware of the leak. Still, the gas companies have much more sensitive equipment that will detect gas leaks too small to detect with soap.
Still, it's not a good idea to muck with gas piping unless you're competant because this is one area where you literally CAN blow your house up. We as DIY'ers save 95 percent of the cost of maintaining and upgrading our homes by doing things ourselves. Why risk our homes and everything in them by doing things we shouldn't do to save some of that remaining 5 percent. That's not just foolish, it's foolishness on stilts.