Best to call the local heating inspector and ask. It's allowed in some locations,not at all in others. If allowed follow the instructions on grounding and termination outside the furnace cabinet exactly.
Are you talking about an appliance connector or to flexible SS gas line?
You must be carefull in choosing the right size of "yellow" gas line.If not sure use 3/4 inch instead of 1/2 inch..
I have always used nipples and Tees and caps and unions and gas shut off on the heater and then the flex line.
Other wise when you work on heater you have to shut off the gas to the whole house to work on it.