Why Moses Was Barred from the Land at the Rock

Midrash Aggadah, Numbers 20:12

"Because you did not believe in Me, etc." (Numbers 20:12). I told you that you should speak to the rock in My name, and it would give forth its waters. And had you done so, I would have been sanctified in the eyes of the Children of Israel, and they would have feared Me, for they would have said: "If the rock carried out His word, how much more so should we!" But because you did not do so, therefore you shall not bring this congregation [into the land].

Biblical References