Second differential in long exact sequence for Cech cohomology for nonabelian groups I do not really think it fits MO, but I posted it in MathStackExchange with little success, so...
Assume that we have a short exact sequence of, say, Lie groups $1\rightarrow A\rightarrow B\rightarrow C\rightarrow 1$, where $A$ is abelian and ( probably it is necessary but I am not sure) $A$ maps to the center of $B$, and a topological space $X$. Then there is an associated (semi)long exact sequence of Cech cohomology $sets$: $*\rightarrow H^0(X,A)\rightarrow...\rightarrow H^1(X,C)\rightarrow H^2(X,A).$
My question is how to prove that naturally defined last differential $H^1(X,C)\rightarrow H^2(X,A)$ actually produces a cocycle, and so an element in $H^2(X,A)$.
When I tried to verify the cocycle condition, I certainly used that $A$ is commutative, to some extent used that $A$ maps to the center of $B$, but still was not able to finish this quite tricky caclulation due to non-commutativity of $B$. 
I would appreciate the actual calculation or any reference where it is done.
 A: Alright, let's do this exercise. Let $U_i$ be an open cover of $X$ such that every intersection $U_{i_0} \cap U_{i_1} \cap \cdots \cap U_{i_q}$ is either contractible or empty. For example, choose a triangulation of $X$, and, for each vertex $i$ of the traingulation, let $U_i$ be the union of the relative interiors of the faces containing $i$. Then we can use the $U_i$ as a Cech cover to compute sheaf cohomology. We abbreviate $U_{i_0} \cap U_{i_1} \cap \cdots \cap U_{i_q}$ to $U_{i_0 i_1 \cdots i_q}$.
A $1$-cocycle is, for each $U_{ij}$, a section $c_{ij}$ of $C$ over $U_{ij}$, obeying $c_{ij} = c_{ji}^{-1}$ and $c_{ij} c_{jk} c_{ki}=1$ whenever $U_{ijk}$ is nonempty.  Lift each $c_{ij}$ to a section $b_{ij}$ of $B$, with our lifts obeying $b_{ji} = b_{ij}^{-1}$, and put $a_{ijk} = b_{ij} b_{jk} b_{ki}$. Note that $a_{ijk}$ lies in $A$ by the cocycle condition on $c_{ij}$.
We have
$$a_{jki} = b_{jk} \left( b_{ki} b_{ij} b_{jk} \right) b_{jk}^{-1} = b_{jk} a_{ijk} b_{jk}^{-1}$$
which, since $A$ is central in $B$, collapses to $a_{ijk} = a_{jki} = a_{kij}$. Also, $$a_{ikj} = b_{ik} b_{kj} b_{ji} = b_{ki}^{-1} b_{jk}^{-1} b_{ij}^{-1} = \left( b_{ij} b_{jk} b_{ki} \right)^{-1} = a_{ijk}^{-1},$$ so $a_{ikj} = a_{kji} = a_{jik} = a_{ijk}^{-1}$. In short, $a$ has all the antisymmetry properties of a $2$-cochain.
We now want to verify that $a$ is a $2$-cocycle. This means we want to check that
$$a_{ijk} a_{ikl} = a_{lij} a_{ljk}.$$
The LHS is
$$b_{ij} b_{jk} b_{ki} b_{ik} b_{kl} b_{li} = b_{ij} b_{jk} b_{kl} b_{li}$$
and the RHS is
$$b_{li} b_{ij} b_{jl} b_{lj} b_{jk} b_{kl} = b_{li} b_{ij} b_{jk} b_{kl} = b_{li} \left( b_{ij} b_{jk} b_{kl} b_{li} \right) b_{li}^{-1}.$$
Since $b_{ij} b_{jk} b_{kl} b_{li}$ is in $A$ and $A$ is central, this simplifies to $b_{ij} b_{jk} b_{kl} b_{li}$. Now the LHS and RHS match and we are done. $\square$
