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

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