Abu Hurairah reported,

The Prophet ﷺ reported that a man committed a sin and said, "My Lord, I have committed a sin," or he said, "I have done a sinful deed, so forgive me."عز وجل said, "My servant has committed a sin and knows that he has a Lord who forgives sins and holds people accountable for them. I have forgiven my servant."Then he committed another sin, or sinned again, and said, "My Lord, I have committed a sin, so forgive me."تبارك وتعالى said, "My servant knows that he has a Lord who forgives sins and holds people accountable for them. I have forgiven my servant."Then he committed yet another sin, or sinned again, and said, "My Lord, I have committed a sin, so forgive me."He said, "My servant knows that he has a Lord who forgives sins and holds people accountable for them. I have forgiven my servant, so let him do as he wishes."

Ahmad 7948

Sahih

حدثنا يزيد أخبرنا همام بن يحيى عن إسحاق بن عبد الله بن أبي طلحة عن عبد الرحمن بن أبي عمرة

عن أبي هريرة

عن النبي ﷺ أن رجلا أذنب ذنبا فقال رب إني أذنبت ذنبا أو قال عملت عملا ذنبا فاغفره فقال عز وجل عبدي عمل ذنبا فعلم أن له ربا يغفر الذنب ويأخذ به قد غفرت لعبدي ثم عمل ذنبا آخر أو أذنب ذنبا آخر فقال رب إني عملت ذنبا فاغفره فقال تبارك وتعالى علم عبدي أن له ربا يغفر الذنب ويأخذ به قد غفرت لعبدي ثم عمل ذنبا آخر أو أذنب ذنبا آخر فقال رب إني عملت ذنبا فاغفره فقال علم عبدي أن له ربا يغفر الذنب ويأخذ به قد غفرت لعبدي فليعمل ما شاء

أحمد 7948صحيح
Contents
Reference
Commentary
Ayat
Collection
Musnad Ahmad
Book
Abu Hurairah
Numbering
Darussalam 7948
Ahmad 7948