In the Gospel of Matthew, a rich young man asks Jesus what actions bring eternal life. First, Jesus advises the man to obey the commandments. When the man responds that he already observes them, and asks what else he can do, Jesus adds:
If you want to be perfect, go, sell your possessions and give to the poor, and you will have treasure in heaven. Then come, follow me.
Luke has a similar episode and states that:
When he heard this, he became very sad, because he was very wealthy. Jesus looked at him and said, "How hard it is for the rich to enter the kingdom of heaven! Indeed, it is easier for a camel to go through the eye of a needle than for someone who is rich to enter the kingdom of heaven."