Repetitive control that asymptotically tracks or rejects periodic signals has been widely used in many applications. For linear time invariant system, this problem has been thoroughly studied and solved. This paper presents the analysis and synthesis of repetitive control algorithms to track or reject periodic signals for linear time varying systems. Both continuous and discrete time domain results will be presented. A time varying internal model is embedded in the feedback loop to ensure asymptotic performance. It is shown that asymptotic performance can't be achieved with a finite dimensional controller in the continuous time domain, while it is possible in the discrete time domain. Simulation results demonstrate the effectiveness of the proposed algorithms.