Sahih Bukhari Volume 2, Book 21, Hadith Number 285.
Narated By Ibn ‘Umar : The Prophet used to go to the Mosque of Quba (sometimes) walking and sometimes riding. Added Nafi (in another narration), “He then would offer two Rakat (in the Mosque of Quba).”