Central Pattern Generators (CPGs) can generate robust, smooth and coordinated oscillatory signals for locomotion control of robots with multiple degrees of freedom, but the tuning of CPG parameters for a desired locomotor pattern constitutes a tremendously difficult task. This paper addresses this problem for the generation of fish-like swimming gaits with an adaptive CPG network on a multi-joint robotic fish. Our approach converts the related CPG parameters into dynamical systems that evolve as part of the CPG network dynamics. To reproduce the bodily motion of swimming fish, we use the joint angles calculated with the trajectory approximation method as teaching signals for the CPG network, which are modeled as a chain of coupled Hopf oscillators. A novel coupling scheme is proposed to eliminate the influence of afferent signals on the amplitude of the oscillator. The learning rules of intrinsic frequency, coupling weight and amplitude are formulated with phase space representation of the oscillators. The frequency, amplitudes and phase relations of the teaching signals can be encoded by the CPG network with adaptation mechanisms. Since the Hopf oscillator exhibits limit cycle behavior, the learned locomotor pattern is stable against perturbations. Moreover, due to nonlinear characteristics of the CPG model, modification of the target travelling body wave can be carried out in a smooth way. Numerical experiments are conducted to validate the effectiveness of the proposed learning rules.