We show that a gauge field uniquely determines its potential if and only if its holonomy group coincides with the gauge group on every open set in spacetime, provided that the field is not degenerate as a 2-form over spacetime. In other words, there is no potential ambiguity whenever such a field is irreducible everywhere in spacetime. We then show that the ambiguous potentials for those gauge fields are partitioned into gauge-equivalence classes (modulo certain homotopy classes) as a consequence of the nontrivial connectivity of spacetime. These homotopy classes depend on the gauge group, on the holonomy group and on this last group's centralizer in the gauge group.