We now consider the general case, for which \begin{equation} d\rr = \sigma^i\,\ee_i \end{equation} Recalling that the Hodge dual of $\sigma^i$ satisfies \begin{equation} \sigma^i\wedge{*}\sigma^i = g(\sigma^i,\sigma^i)\,\omega \end{equation} we can write \begin{equation} {*}\sigma^i = \frac{1}{(n-1)!}\,\epsilon^i{}_{j…k}\,\sigma^j\wedge…\wedge\sigma^k \end{equation} where the $n$-index object $\epsilon_{ij…k}$ is the alternating symbol in $n$ dimensions, sometimes called the Levi-Civita symbol, which satisfies \begin{equation} \epsilon_{1…n}=1 \end{equation} and is completely antisymmetric in its indices. The factor of $(n-1)!$ is needed to compensate for the implicit sum, and the raised index takes care of the factor of $g(\sigma^i,\sigma^i)$. We therefore have \begin{equation} {*}d\rr = \frac{1}{(n-1)!}\,\epsilon^i{}_{j…k}\, \ee_i\,\sigma^j\wedge…\wedge\sigma^k \end{equation} so that, using the structure equations, \begin{align} d{*}d\rr &= \frac{1}{(n-1)!}\,\epsilon^i{}_{j…k} \Big( d\ee_i\wedge\sigma^j\wedge…\wedge\sigma^k + \ee_i\,d\sigma^j\wedge…\wedge\sigma^k + … \nonumber\\ &\qquad\qquad + (-1)^{n-2}\ee_i\,\sigma^j\wedge…\wedge d\sigma^k \Big) \nonumber\\ &= \frac{1}{(n-1)!}\,\epsilon^i{}_{j…k} \Big( \ee_m\omega^m{}_i\wedge\sigma^j\wedge…\wedge\sigma^k - \ee_i\,\omega^j{}_m\wedge\sigma^m\wedge…\wedge\sigma^k - … \nonumber\\ &\qquad\qquad - (-1)^{n-2}\,\ee_i\,\sigma^j\wedge…\wedge\omega^k{}_m\wedge\sigma^m \Big) \nonumber\\ &= \frac{1}{(n-1)!}\,\ee_i\Big( \epsilon^m{}_{j…k} \omega^i{}_m - \epsilon^i{}_{m…k}\omega^m{}_j - … \nonumber\\ &\qquad\qquad\qquad \hphantom{x} - \epsilon^i{}_{j…m}\omega^m{}_k \Big)\wedge\sigma^j\wedge…\wedge\sigma^k \end{align} since moving the connection 1-forms to the front eliminates the signs, and the indices being summed over can be relabeled. To see that this expression is zero, consider the factor in parentheses. Lower an index to obtain \begin{align} \epsilon^m{}_{j…k} \omega_{im} & - \epsilon_{im…k}\omega^m{}_j - \epsilon_{ij…m}\omega^m{}_k \nonumber\\ &= \epsilon^m{}_{j…k} \omega_{im} + \epsilon^m{}_{i…k}\omega_{mj} + \epsilon^m{}_{j…i}\omega_{mk} \end{align} If $i$,$j$,…,$k$ are distinct, then each term vanishes for each value of $m$. For the first term to be nonzero, we must have $i\in\{j…k\}$, and since $i$ is a free index, this must be true in the remaining terms as well. But for each allowed choice of $i$, precisely one of the remaining terms is nonzero, and the antisymmetry of the connection 1-forms (due to metric compatibility) now ensures that this nonzero term exactly cancels the first term.
This completes the proof that $d{*}d\rr=0$; the metric is divergence free.