First, the Holy Mother Church's history is a bit questionable (such as Peter's role as the first Pope). During the time that Scripture was written, the church was based not in Rome but in Jerusalem as is evident by the Council at Jerusalem. James was apparently lead there and Peter at some point was rebuked by Paul.
Scripture was penned under inspiration of the Holy Spirit. but NOWHERE in Scripture does it say that the Church itself is infallible. Paul, in fact, commends the Bereans for daring to question him.
So, as they wrote Scripture under the Holy Spirit's guidance, yes, they were writing infallibly. As a church body making decisions and sharing (sometimes contradictory) decisions, they were not.
The Rock that Jesus was to build His church upon was not Peter. Rather, it was Peter's confession or the truth that Jesus Christ is the Lord, the Messiah, God in the flesh.
*Both.
Brother, even most protetstants are now admitting Peter/Cephas/Kepha was the rock.
When Jesus first spoke to him - Gospel of John - He tld Simon Barjonas he would change his name to Peter.
"Peter" as a name had never before existed.
When God changes your name, it signifes something rather important,no?
Really?
"I will build my church, and the gates of hell shall not prevail against it" does not cut it? Why? How about "church, the pillar and foundation of truth"?
The Rock that Jesus was to build His church upon was not Peter
The scripture says the opposite: "Su ei Petros kai epi taute te petra oikodomeso mou ten ekklesian". It does not say "your confession is rock", etc., but rather "you are [masculine of] rock".
AMEN!
BTW, a study of how the canon was formed will reveal that the last to recognize it was Rome.