Sa'id bin al-Musayyib (may Allah have mercy on him) said that Sayyiduna Umar (may Allah be pleased with him) said to Sayyiduna Abu Bakrah (may Allah be pleased with him): If you repent, your testimony will be accepted; or he said: Repent, and your testimony will be accepted.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب الشهادات / 20546