If someone have faith in Jesus they will do as Jesus say to enter into life and not run to Paul as if Paul is great then Jesus. A man asked Jesus this very question, "...What good thing shall I do that I may have eternal life?", and Jesus replied, Why callest thou me good? there is none good but one, that is, God: but if thou wilt enter into life, keep the commandments. (Matthew 19:16-19).
Throughout the bible we find that in order to receive eternal salvation we must keep God's commandments to the end. If we make a mistake we must not give up, but I press toward the mark for the prize of the high calling of God in Christ Jesus (Philippians 3:13-14). The last chapter in the whole bible reminds us of this one last time. "Blessed are they that do his commandments that they may have right to the tree of life." (Revelation 22:14). After this we find only seven more verses in the bible, and none of them does away with God's commandments.
Of course no one can keep the commandments of God apart from the power of the Holy Ghost (Galatians 6:13, Galatians 3:22).
When Jesus told the rich young ruler what He did, He was bringing the law to bear upon his conscience and not telling him that he could possibly enter into life by keeping the law. While he may have thought that he had kept the law from his youth, Jesus' intention in telling him this was to bring him to the end of himself which is something that the law ought to do in us.
The rich young ruler was self-righteous, yet Jesus loved him; and the next step was that he told him what he yet lacked in his moral endeavor...he needed to sell all that he had and give to the poor. Then he would truly be "loving his neighbor as himself".
You see, Jesus' aim was to bring him to the end of himself. That is what the law does.
Only when you come to the end of yourself and begin to rely on the Holy Spirit as one who has been forgiven and redeemed through the blood of Christ, can you begin to walk in such a manner as to have the righteousness of the law be fulfilled in you (Romans 8:4).
And if you have been redeemed through faith in the blood of Jesus, your venue towards salvation no longer has anything to do with your works, or keeping the law, or personal merit.
Consider Romans 4:4. God will not owe anything to mankind but desires to give salvation to him as a free gift (Romans 5:15-19).
We are therefore forgiven and justified solely through faith in the blood of Jesus; and therefore law-keeping is not even in the running as a venue by which we might be able to obtain salvation (see Romans 3:20, Galatians 2:16).
Jesus gave credence to Peter's writings in John 14:26, 16:13; and Peter gave credence to Paul's writings in 2 Peter 3:15-16; and Paul gave credence to the rest of holy scripture in 2 Timothy 3:15-17.