Sahih al-Bukhari, Volume 2, Book 18, Hadith 168 (USC-MSA)

Narrated Al-Mughira bin Shu`ba: On the day of Ibrahim's death, the sun eclipsed and the people said that the eclipse was due to the death of Ibrahim (the son of the Prophet). Allah's Messenger said, "The sun and the moon are two signs amongst the signs of Allah. They do not eclipse because of someone's death or life. So when you see them, invoke Allah and pray till the eclipse is clear."

حَدَّثَنَا أَبُو الْوَلِيدِ، قَالَ حَدَّثَنَا زَائِدَةُ، قَالَ حَدَّثَنَا زِيَادُ بْنُ عِلاَقَةَ، قَالَ سَمِعْتُ الْمُغِيرَةَ بْنَ شُعْبَةَ، يَقُولُ انْكَسَفَتِ الشَّمْسُ يَوْمَ مَاتَ إِبْرَاهِيمُ، فَقَالَ النَّاسُ انْكَسَفَتْ لِمَوْتِ إِبْرَاهِيمَ‏.‏ فَقَالَ رَسُولُ اللَّهِ صلى الله عليه وسلم ‏ "‏ إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللَّهِ، لاَ يَنْكَسِفَانِ لِمَوْتِ أَحَدٍ وَلاَ لِحَيَاتِهِ، فَإِذَا رَأَيْتُمُوهُمَا فَادْعُوا اللَّهَ وَصَلُّوا حَتَّى يَنْجَلِيَ ‏" ‏‏.‏

sunnah.com

And this was narrated by Asma' who said, "Allah's Messenger finished the eclipse prayer and by then the sun (eclipse) had cleared. Then he delivered the Khutba (religious talk) and praised Allah as He deserved and then said Amma ba'du."

وَقَالَ أَبُو أُسَامَةَ حَدَّثَنَا هِشَامٌ، قَالَ أَخْبَرَتْنِي فَاطِمَةُ بِنْتُ الْمُنْذِرِ، عَنْ أَسْمَاءَ، قَالَتْ فَانْصَرَفَ رَسُولُ اللَّهِ صلى الله عليه وسلم وَقَدْ تَجَلَّتِ الشَّمْسُ فَخَطَبَ، فَحَمِدَ اللَّهَ بِمَا هُوَ أَهْلُهُ ثُمَّ قَالَ ‏ "‏ أَمَّا بَعْدُ ‏" ‏‏.‏

sunnah.com