Language:
كتاب الأدب
78  
Good Manners and Form (Al-Adab)
(74)
Chapter: Whoever does not consider as Kafir the person who says that...
(74)
باب مَنْ لَمْ يَرَ إِكْفَارَ مَنْ قَالَ ذَلِكَ مُتَأَوِّلاً أَوْ جَاهِلاً
Sahih al-Bukhari 6108

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 : Vol. 8, Book 73, Hadith 129
  (deprecated numbering scheme)