Consider a compact Riemannian manifold of dimension $\geq 3$ with strictly convex boundary, such that the manifold admits a strictly convex function. We show that the attenuated ray transform in the presence of an arbitrary connection and Higgs field is injective modulo the natural obstruction for functions and one-forms. We also show that the connection and the Higgs field are uniquely determined by the scattering relation modulo gauge transformations. The proofs involve a reduction to a local result showing that the geodesic X-ray transform with a matrix weight can be inverted locally near a point of strict convexity at the boundary, and a detailed analysis of layer stripping arguments based on strictly convex exhaustion functions. As a somewhat striking corollary, we show that these integral geometry problems can be solved on strictly convex manifolds of dimension $\geq 3$ having non-negative sectional curvature (similar results were known earlier in negative sectional curvature). We also apply our methods to solve some inverse problems in quantum state tomography and polarization tomography.