the Fatwa Department Research Committee - chaired by Sheikh `Abd al-Wahhâb al-Turayrî
Publicizing one’s repentance is not a condition of repentance, regardless of whether the sin was committed openly or in secret.
In the case where a person committed the sin secretly, he should definitely not publicize his repentance, since that would be exposing to others a sin that Allah had concealed.
Ibn `Umar relates that he heard the Prophet (peace be upon him ) speak about the private reckoning of deeds in the Hereafter, saying:
You will come close to Allah until you are concealed by Him. Then He will ask you: “Did you do this and that?”
And you will reply: “Yes.”
Then He will ask you: “Did you do this and that?”
You will reply: “Yes.”
He will make you declare all of your misdeeds, then He will tell you: “I have concealed (your misdeeds) in the world, and I will forgive you now.” [Sahîh al-Bukhârî (2441) and Sahîh Muslim (2768)]
If the person had sinned publicly, it is his choice as to whether he wishes to make his repentance public. If he thinks it will benefit others – or be a source of guidance for them, then he may do so. However, he is under no obligation to publicize his penance.
And Allah knows best.
Source: Islam Today