a bunch of fixes to get repository cloning to work