Psalm 2:6 records God's declaration that He has installed His king upon Zion, His holy hill. The adjective "holy" in the verse grammatically describes Zion rather than directly describing the king's personal character. For that reason, the passage should not by itself be cited as a straightforward prediction that the Messiah would be morally holy.
The New Testament nevertheless clearly presents Jesus as holy and without sin. In John 8:46 Jesus challenges His opponents to convict Him of sin, and Revelation 3:7 identifies Him as "the holy one, the true one." The relationship to Psalm 2:6 is therefore best understood within the psalm's broader portrait of God's divinely appointed Messiah rather than as a direct lexical fulfillment. The King whom God establishes on holy Zion is ultimately identified by Christians with Jesus, whose character the New Testament independently reveals to be perfectly holy.