Fix Repo private key get truncated if used with mysql

And enable drone to regenerate key pair fo repos.