The signs of g and u depends on the conventions you are applying.
if you take upward direction as positive, then g is negative as it acts downwards.
if you take downward direction as positive, then g is positive.
generally, upward is taken positive and g negative.
also u depends on inital conditions.
if you throw a ball upward, u is positive, while g is negative (acc. to first convention)
if a ball is dropped from a height, u is negative, g is also negative (acc. to first convention)