Fix the bug of set an existed tag name of a repository

Signed-off-by: Lei Jitang <leijitang@huawei.com>