Matthew 19:17
Did Jesus deny being good, and therefore deny being divine?
The standard explanation is that Jesus is essentially saying to the ruler, "Do you know what you are implying? You say I am good; but only God is good; therefore, you realize that you are identifying me with God?" In Jewish thought, God was pre-eminently good, so that the ruler was indeed offering Jesus a compliment usually reserved for God. Since it is quite unlikely that the ruler truly believed that Jesus was identifiable as God the Son, this looks more like an effort by Jesus to make the man think about what he is saying before he blurts it out or engages in indiscriminate flattery.
Confirmation and elucidation of this explanation is found in Malina and Rohrbaugh's Social-Science Commentary on the Synoptic Gospels. They explain that in an agonistic (honor-shame) culture, a "compliment" like the rich young man's is actually a challenge and an attempt to put Jesus "on the spot," for they are an implicit accusation that one has been trying to rise above others. Jesus' only alternative was indeed to parry the compliment and redirect it to its appropriate subject (unless he wanted to reveal himself directly and fully, in which case, his claim would have been another challenge of honor to others), thus showing himself honorable by diffusing any accusation that would arouse the envy of an opponent.
Thus it is appropriate that Jesus parry the compliment in a way that does not specifically deny His divine nature. In short, there isn't anything here that has Jesus denying goodness, or His divinity—just teaching an overenthusiastic challenger a lesson.