Given a connection $A_{i\alpha}^\beta$ the curvature is
$$F_{ij\alpha}^\beta=\frac{\partial A_{j\alpha}^\beta}{\partial x^i}-\frac{\partial A_{i\alpha}^\beta}{\partial x^j}+A_{i\gamma}^\beta A_{j\alpha}^\gamma-A_{j\gamma}^\beta A_{i\alpha}^\gamma.$$
In the case of a line bundle one can only have $\alpha=\beta=1$ so denoting $A_i=A_{i1}^1$ you get
$$F_{ij}=\frac{\partial A_j}{\partial x^i}-\frac{\partial A_i}{\partial x^j}.$$
In general this is nonzero.
Now, given a bundle metric $g_{\alpha\beta}$, metric-compatibility of the connection means that $A_{i\alpha}^\gamma g_{\beta\gamma}+A_{i\beta}^\gamma g_{\alpha\gamma}=\partial_i g_{\alpha\beta}.$ Differentiating relative to $x^j$, and subtracting off the same equation with $i$ and $j$ swapped, you get the skew-symmetry
$$F_{ij\alpha}^\gamma g_{\beta\gamma}+F_{ij\beta}^\gamma g_{\alpha\gamma}=0.$$
Returning again to the case of a line bundle, this says $2F_{ij}=0$ i.e. $F=0.$