Tuck wont start

ijust finished installing a new used engine in my truck and now it will only start when gas is poured in it. please help this is messing with my head. once started it rund and drives just fine.

You don’t say what year your GMC is. If it is old enough to have a carburetor and mechanical fuel pump, there may be a leak in the fuel line between the gas tank and the fuel pump. The pump is then sucking air. Once you have started the truck, the pump works hard enough to overcome the bad place in the fuel line.

truck is a 1995 ,thanks for the help triedag, i fixed the problem the truck was seriously out off time.