'Ali (Allah be pleased with him) reported having said this
Messenger of Allah, why is it that you select (your wife) from among the Quraish, but you ignore us (the nearest of the kin)? Thereupon he said: Have you anything for me (a suitable match for me)? I said; Yes, the daughter of Hamza, whereupon Allah's Messenger (ﷺ) said: She is not lawful for me, for she is the daughter of my brother by reason of fosterage.
A hadith like this has been narrated on the authority of A'mash with the same chain of transmitters.
Ibn Abbas (Allah be pleased with them) reported
It was proposed that he (the Holy Prophet) be married to the daughter of Hamza, whereupon he said: She is not lawful for me for she is the daughter of my foster-brother, and that is unlawful by reason of fosterage what is unlawful by reason of genealogy.
A hadith like this is narrated on the authority of Hammam, Sa'id, Bishr b 'Umar, but with a small variation of words.
Umm Salama (Allah be pleased with her), the wife of Allah's Apostle (ﷺ), said
It was said to the Messenger of Allah (ﷺ): Is not the daughter of Hamza a suitable match for you? Or it was said: Why don't you propose to marry the daughter of Hamza, the son of Abd al-Muttalib? Thereupon he said: Hamza is my brother by reason of fosterage.