Has to be with the foot.
Or from a throw-in
.
Here's the rule:
The offense rests on three events occurring in the following sequence:
The ball is kicked (played with the foot, not the knee, thigh, or shin) by a teammate of the goalkeeper,
This action is deemed to be deliberate, rather than a deflection or miskick, and
The goalkeeper handles the ball directly (no intervening touch of play of the ball by anyone else)
When, in the opinion of the referee, these three conditions are met, the violation has occurred. It is not necessary for the ball to be “passed,†it is not necessary for the ball to go “back,†and it is not necessary for the deliberate play by the teammate to be “to†the goalkeeper.