Kharashah bin al-Hurr (may Allah have mercy on him) said: A man came to Sayyiduna Umar bin al-Khattab (may Allah be pleased with him) to give testimony. He (may Allah be pleased with him) said to him: I do not know you, but that will not harm you at all once you bring someone who knows you. A man from the people said: I know him. He (may Allah be pleased with him) asked: By what do you know him? He said: By his uprightness and virtue. He (may Allah be pleased with him) said: Is he your near neighbour, so that you know his nights and days and are familiar with his comings and goings? He said: No. He (may Allah be pleased with him) said: Have you inferred his piety through dealings in dirhams and dinars? He said: No. He (may Allah be pleased with him) asked: Was he your companion on a journey, so that you infer his good character? He said: No. Sayyiduna Umar (may Allah be pleased with him) said: You do not know him. Bring someone who knows you.
Hadith Referenceالسنن الكبرى للبيهقي / كتاب آداب القاضي / 20400