In this paper we develop a concrete description of connections on principal bundles, possibly non-trivial, over compact surfaces and use this description to construct the Yang-Mills measure which underlies the Euclidean quantum theory of gauge fields, involving compact gauge gro…