Fix adding nighly repository

Also change the registeration command to be more safe.