TITLE: Group Extensions and Line Bundles on $BG$
QUESTION [8 upvotes]: I am sure the answer to this question is well-known, but 
It is well known that the group cohomology $H^2(G,\mathbb Z)$ classifies group extensions $0\to \mathbb Z\to E\to G\to 1$ and that for a topological space $X$ elements of $H^2(X,\mathbb Z)$ are in natural bijection with complex line bundles on $X$.
My question is thus:
What is the direct correspondence between extensions of $G$ and line bundles on $BG$?
That is, given an explicit line bundle $L$ how does one construct an explicit group extension $E$ such that the two give the same cohomology class and vice versa?

REPLY [5 votes]: Your line bundle $L$ over $BG$ can be seen as a $G$-equivariant line bundle over a point. That is, up to isomorphism, just a continuous group homomorphism $f:G \to \mathbb{C}^{\times}$. Try to lift $f$ along $\exp: \mathbb{C} \to \mathbb{C}^{\times}$ on an open cover of $G$. The error is a $\mathbb{Z}$-valued Cech-1-cocycle on $X$, and $E$ is the total space of the associated $\mathbb{Z}$-bundle over $X$.