It was narrated from Salim bin 'Abdullah bin 'Umar, from his father, from 'Umar, that :
the Messenger of Allah (ﷺ) heard him swearing by his father. The Messenger of Allah (ﷺ) said: 'Allah forbids you from making oaths by your forefathers." 'Umar said: I never took an oath by them (i.e., my forefathers) myself nor narrating such words from anyone else."
English reference: Vol. 3, Book 11, Hadith 2094
Arabic reference: Book 11, Hadith 2172