Cabal has a git repository on github.com. Hackage has a darcs repository on darcs.haskell.org.
Note: the cabal-install package now lives in the same repository as the Cabal library package (older versions had separate repos).
https://github.com/haskell/cabal/
git clone git://github.com/haskell/cabal.git
darcs get http://code.haskell.org/hackage-scripts/
darcs get http://code.haskell.org/hackage-server/