If we have a topological space $X$ and an exact sequence of groups $1\rightarrow A\rightarrow B\rightarrow C\rightarrow 1$, where $A$ is abelian and ( probably it is necessary but I am not sure) maps to the center of $B$, then we can construct an exact sequence of Cech cohomology sets : $*\rightarrow H^0(X,A)\rightarrow...\rightarrow H^1(X,C)\rightarrow H^2(X,A)$.
And this is where my question comes. How do we prove that the second "degree-shifting" differential actually produces a cocycle in $H^2(X,A)$? I tried several times to verify the cocycle condition, but did not succeed. I clearly used commutativity of $A$ and to some extent used that $A$ maps to the center of $B$ but still was not able to " cancel out" the terms due to the noncommutativity of $B$.
Can somebody give me some hints how to actually perform this rather tricky calculation?