Sahih al-Bukhari 5785
Narration text is preserved in its supplied Arabic and English. Translated interfaces and reading guides do not add narration translations in other languages.
إِنَّ الشَّمْسَ وَالْقَمَرَ آيَتَانِ مِنْ آيَاتِ اللَّهِ، فَإِذَا رَأَيْتُمْ مِنْهَا شَيْئًا فَصَلُّوا وَادْعُوا اللَّهَ حَتَّى يَكْشِفَهَا "
Narrated Abu Bakra:
The solar eclipse occurred while we were sitting with the Prophet (ﷺ) He got up dragging his garment (on the ground) hurriedly till he reached the mosque The people turned (to the mosque) and he offered a two-rak`at prayer whereupon the eclipse was over and he traced us and said, "The sun and the moon are two signs among the signs of Allah, so if you see a thing like this (eclipse) then offer the prayer and invoke Allah till He remove that state."
Full reference and source
Sahih al-Bukhari 5785 In-book : Book 77, Hadith 3 USC-MSA web (English) : Vol. 7, Book 72, Hadith 676 (deprecated)
View source on Sunnah.com (opens in a new tab)