Sunan Ibn Majah, Volume 5, Book 37, Hadith 4248 (DarusSalam)

It was narrated from Abu Hurairah that the Prophet said: “If you were to commit sin until your sins reach the heaven, then you were to repent, your repentance would be accepted.”

حَدَّثَنَا يَعْقُوبُ بْنُ حُمَيْدِ بْنِ كَاسِبٍ الْمَدَنِيُّ، حَدَّثَنَا أَبُو مُعَاوِيَةَ، حَدَّثَنَا جَعْفَرُ بْنُ بُرْقَانَ، عَنْ يَزِيدَ بْنِ الأَصَمِّ، عَنْ أَبِي هُرَيْرَةَ، عَنِ النَّبِيِّ ـ صلى الله عليه وسلم ـ قَالَ ‏:‏ ‏ "‏ لَوْ أَخْطَأْتُمْ حَتَّى تَبْلُغَ خَطَايَاكُمُ السَّمَاءَ ثُمَّ تُبْتُمْ لَتَابَ عَلَيْكُمْ ‏" ‏ ‏.‏

sunnah.com