Support 'remote' repos

Patch [2/2] has an explanation of what's going on.