The Ante-Nicene Fathers Series refers to this section of The Shepherd of Hermas as “Commandment XII.” The Lightfoot translation that I am quoting from and linking to calls it Mandate 12. Search “Mandate 12” (or phrases in the quote) at the link to find the passage. It speaks for itself without my commentary.
3:1 “I would fain know, Sir,” say I, “in what ways I ought to serve the good desire.” “Listen,” saith he; “practice righteousness and virtue, truth and the fear of the Lord, faith and gentleness, and as many good deeds as are like these. Practicing these thou shalt be well-pleasing as a servant of God, and shalt live unto Him; yea, and every one who shall serve the good desire shall live unto God.”
3:2 So he completed the twelve commandments, and he saith to me; Thou hast these commandments; walk in them, and exhort thy hearers that their repentance may become pure for the rest of the days of their life.
3:3 This ministration, which I give thee, fulfill thou with all diligence to the end, and thou shalt effect much. For thou shalt find favor among those who are about to repent, and they shall obey thy words. For I will be with thee, and will compel them to obey thee.”
3:4 I say to him; “Sir, these commandments are great and beautiful and glorious, and are able to gladden the heart of the man who is able to observe them. But I know not whether these commandments can be kept by a man, for they are very hard.”
3:5 He answered and said unto me; “If thou set it before thyself that they can be kept, thou wilt easily keep them, and they will not be hard; but if it once enter into thy heart that they cannot be kept by a man, thou wilt not keep them.
3:6 But now I say unto thee; if thou keep them not. but neglect them thou shalt not have salvation, neither thy children nor thy household, since thou hast already pronounced judgment against thyself that these commandments cannot be kept by a man.”
4:1 And these things he said to me very angrily, so that I was confounded, and feared him exceedingly; for his form was changed, so that a man could not endure his anger.
4:2 And when he saw that I was altogether disturbed and confounded, he began to speak more kindly [and cheerfully] to me, and he saith; “Foolish fellow, void of understanding and of doubtful mind, perceivest thou not the glory of God, how great and mighty and marvelous it is, how that He created the world for man’s sake, and subjected all His creation to man, and gave all authority to him, that he should be master over all things under the heaven?
4:3 If then,” [he saith,] “man is lord of all the creatures of God and mastereth all things, cannot he also master these commandments Aye,” saith he, “the man that hath the Lord in his heart can master [all things and] all these commandments.
4:4 But they that have the Lord on their lips, while their heart is hardened, and are far from the Lord, to them these commandments are hard and inaccessible.
4:5 Therefore do ye, who are empty and fickle in the faith, set your Lord in your heart, and ye shall perceive that nothing is easier than these commandments, nor sweeter, nor more gentle.