One problem here is that it ends up as ```git config $repo --git-dir```, which is invalid. You need to specify it as ```git --git-dir $repo config```. It would also be nice to quote the value.