The tradition of clerical celibacy was solemnly proclaimed by the church through the following
the Council of Nicaea, the First Ecumenical Council, in 325. Canon No. 3,
This great synod absolutely forbids a bishop, presbyter, deacon or any of the clergy to keep a woman who has been brought in to live with him, with the exception of course of his mother or sister or aunt, or of any person who is above suspicion.
The Council of Carthage in 390 stated that celibacy of is Apostolic origin.
The Council of Carthage, 390 AD, canon 3:It is fitting that the holy bishops and priests of God as well as the Levites, i.e. those who are in the service of the divine sacraments, observe perfect continence, so that they may obtain in all simplicity what they are asking from God; what the Apostles taught and what antiquity itself observed, let us also endeavour to keep
The bishops declared unanimously: It pleases us all that bishop, priest and deacon, guardians of purity, abstain from conjugal intercourse with their wives, so that those who serve at the altar may keep a perfect chastity.
St. Epiphanius of Salamis (ca. 315-403): “It is the Apostles themselves who decreed this law.”
Code:
St. Jerome (ca. 342-420): "Priests and deacons must be either virgins or widowers before being ordained, or at least observe perpetual continence after their ordination.... If married men find this difficult to endure, they should not turn against me, but rather against Holy Writ and the entire ecclesiastical order."
Pope St. Innocent I (401-417): "This is not a matter of imposing upon the clergy new and arbitrary obligations, but rather of reminding them of those which the tradition of the Apostles and the Fathers has
transmitted to us."
Code:
St. Peter Damian (1007-1072) wrote: "No one can be ignorant of the fact that all the Fathers of the Catholic Church unanimously imposed the inviolable rule of continence on clerics in major orders."
en.allexperts.com/q/Catholics-955/chastity.htm
It was Pope Gregory VII in the 11th c who decreed that priests should be celibate, this was ratified by subsequent Popes, so presumably priests where allowed to marry before this time