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

Signed-off-by: Lei Jitang <leijitang@huawei.com>
Add docker tag test

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