"When the sun eclipsed in the lifetime of Allah's Messenger (ﷺ) an announcement was made that a prayer was to be offered in congregation."
Sahih al-Bukhari Book 16, Hadith 6