Abu Bakr sent me among those who were to make a public announcement on the Day of Sacrifice at Mina, "No polytheist shall perform Hajj after this year, and no one shall circumambulate the House while naked." So Abu Bakr publicly proclaimed this to the people that year, and in the year of the Farewell Pilgrimage, in which the Prophet ﷺ performed Hajj, no polytheist performed the pilgrimage.
بعثني أبو بكر فيمن يؤذن يوم النحر بمنى: لا يحج بعد العام مشرك، ولا يطوف بالبيت عريان… فنبذ أبو بكر إلى الناس في ذلك العام، فلم يحج عام حجة الوداع الذي حج فيه النبي ﷺ مشرك.
Bukhari narrated it in "Jizya and Truces" (3177), and Muslim in "Hajj" (1347), both through Ibn Shihab Zuhri, who said, Humayd bin Abdul-Rahman bin Awf told us that Abu Hurairah said, then he related it, and the wording is Bukhari's.