The Messenger of Allah ﷺ said, "Allah forbids you from swearing by your fathers."
أخبرني زياد بن أيوب قال حدثنا ابن علية قال حدثنا يحيى بن أبي إسحق قال حدثني رجل من بني غفار في مجلس سالم بن عبد الله قال سالم بن عبد الله سمعت عبد الله يعني
قال رسول الله ﷺ إن الله ينهاكم أن تحلفوا بآبائكم
No references are available.
[Its chain of transmission is sahih]. Ahmad narrated it, 2/48, from Ismail bin Ulaya, with the same chain. It is also in al-Kubra, hadith 4706, from a man of Banu Ghifar, which Salim confirmed to him. The hadith has corroborating narrations, among them the preceding hadith.