(74) باب مَنْ لَمْ يَرَ إِكْفَارَ مَنْ قَالَ ذَلِكَ مُتَأَوِّلاً أَوْ جَاهِلاً
Narrated Ibn `Umar:
that he found `Umar bin Al-Khattab in a group of people and he was swearing by his father. So Allah's Messenger (ﷺ) called them, saying, "Verily! Allah forbids you to swear by your fathers. If one has to take an oath, he should swear by Allah or otherwise keep quiet."
Reference: Sahih al-Bukhari 6108
In-book reference: Book 78, Hadith 135
USC-MSA web (English) reference(deprecated numbering scheme): Vol. 8, Book 73, Hadith 129