but Peter had to wait outside at the door. The other disciple, who was known to the high priest, came back, spoke to the girl on duty there and brought Peter in.

Peter was as close to Jesus as he could get and was just waiting for an opportunity to get closer and yet, if he had listened to and obeyed the words of Jesus that He spoke in (John 13:36), he never would have denied Him. This is what happens when we, like Peter, try to do things out of our own strength.

John 13:36  Simon Peter asked him, “Lord, where are you going?” Jesus replied, “Where I am going, you cannot follow now, but you will follow later.”

Note that the other disciple was trying to do a favor for Peter, but if he had not used his influence to get him into the courtyard, Peter would have never sinned by denying Jesus. Sometimes the best intentions of our friends prove to be our downfall. Again, God knows what is best for us. We need to seek His counsel and then do what He says out of His strength and ability and not out of our own.

The high priest had a female doorkeeper much as in (Acts 12:13).

Acts 12:13  Peter knocked at the outer entrance, and a servant girl named Rhoda came to answer the door.