We consider interacting vortices in a quasi-one-dimensional array of Josephson junctions with small capacitance. If the charging energy of a junction is of the order of the Josephson energy, the fluctuations of the superconducting order parameter in the system are considerable, and the vortices behave as quantum particles. Their density may be tuned by an external magnetic field, and therefore one can control the commensurability of the one-dimensional vortex lattice with the lattice of Josephson junctions. We show that the interplay between the quantum nature of a vortex, and the long-range interaction between the vortices leads to the existence of a specific commensurate-incommensurate transition in a one-dimensional vortex lattice. In the commensurate phase an elementary excitation is a soliton, with energy separated from the ground state by a finite gap. This gap vanishes in the incommensurate phase. Each soliton carries a fraction of a flux quantum; the propagation of solitons leads to a finite resistance of the array. We find the dependence of the resistance activation energy on the magnetic field and parameters of the Josephson array. This energy consists of the above-mentioned gap, and also of a boundary pinning term, which is different in the commensurate and incommensurate phases. The developed theory allows us to explain quantitatively the available experimental data.