  We present the detailed derivation of the recently announced most general
cosmological solution with homogeneous and isotropic metric in the ghost-free
massive gravity theory. We use the standard parametrization of the theory in
terms of the matrix square root, and then show how the same results are
recovered within the tetrad formulation. The solution obtained includes the
matter source, it exists for generic values of the theory parameters, and it
describes a universe that can be spatially open, closed, or flat, and that
shows the late time acceleration due to the effective cosmological term
mimicked by the graviton mass. The St\"uckelberg fields are inhomogeneous,
which could probably give rise to inhomogeneous perturbations of the
homogeneous and isotropic backgrounds, although this effect should be
suppressed by the smallness of the graviton mass.
