Narrated Ibn 'Umar (RA):
Allah's Messenger (ﷺ) overtook 'Umar bin al-Khattab when he was with a party of riders of about ten and 'Umar was swearing by his father. Allah's Messenger (ﷺ) called them and said, "Verily! Allah forbids you from swearing by your fathers. Therefore, if anyone swears, he must swear by Allah or keep silent." [Agreed upon]
Reference: Bulugh al-Maram 1374
In-book reference: Book 13, Hadith 1
English translation: Book 13, Hadith 1374