[api] Fix bug in set repo passwod