Fix repo key generation