Two-component Ginzburg–Landau model with one magnetic gauge potential can be used to describe the physical properties of two-gap superconductor. When the order parameters in two-gap superconductor have different phases, the gauge invariance will be destroyed. In order to preserve gauge invariance, two kinds of gauge potentials must be introduced. For seeking the origins of two kinds of gauge potentials, one suggests two kinds of order parameters are in the coherent state. Therefore, two different gauge potentials and masses of the order parameters arise through deducing the super-current of the coherent state. As a result, two different gauge potentials lead to different magnetic fields at the zero points of the order parameters. In other places, the gauge potentials have no contributions to the magnetic field. Moreover, the topological properties of two different gauge potentials are discussed in detail.