Muwatta Malik, Book 22, Hadith 14 (USC-MSA)

Yahya related to me from Malik from Nafi from Abdullah ibn Umar that one time the Messenger of Allah, may Allah bless him and grant him peace, was speaking to Umar ibn al-Khattab while he was travelling with a troop and Umar swore by his father and he (the Messenger) said, "Allah forbids you to swear by your fathers. If anyone swears, let him swear by Allah or keep silent."

حَدَّثَنِي يَحْيَى، عَنْ مَالِكٍ، عَنْ نَافِعٍ، عَنْ عَبْدِ اللَّهِ بْنِ عُمَرَ، أَنَّ رَسُولَ اللَّهِ صلى الله عليه وسلم أَدْرَكَ عُمَرَ بْنَ الْخَطَّابِ - رضى الله عنه - وَهُوَ يَسِيرُ فِي رَكْبٍ وَهُوَ يَحْلِفُ بِأَبِيهِ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّ اللَّهَ يَنْهَاكُمْ أَنْ تَحْلِفُوا بِآبَائِكُمْ فَمَنْ كَانَ حَالِفًا فَلْيَحْلِفْ بِاللَّهِ أَوْ لِيَصْمُتْ ‏" ‏ ‏.‏

sunnah.com

also referenced under: Book 22, Hadith 1027 (In-Book)