Sahih Bukhari – Hadith No : 6176

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 Apostle 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.”

Hadith In Arabic Text :

حدثنا قتيبة، حدثنا ليث، عن نافع، عن ابن عمر رضى الله عنهما أنه أدرك عمر بن الخطاب في ركب وهو يحلف بأبيه، فناداهم رسول الله صلى الله عليه وسلم ‏”‏ ألا إن الله ينهاكم أن تحلفوا بآبائكم، فمن كان حالفا فليحلف بالله، وإلا فليصمت ‏”‏‏.‏

Chapter : Good Manners and Form (Al-Adab) – كتاب الأدب