
Determine whether GIT_SERVER exists, if not, there is no need to convert the git address. Signed-off-by: cuiyili <2268260388@qq.com> --- tests/deploy-cci | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/deploy-cci b/tests/deploy-cci index edfc5540..e296568f 100755 --- a/tests/deploy-cci +++ b/tests/deploy-cci @@ -3,10 +3,12 @@ # Copyright (c) 2020 Huawei Technologies Co., Ltd. All rights reserved. # redirect remote-repository address to "/srv/git/gitee.com" -cat >> /etc/gitconfig <<EOF -[url "git://$GIT_SERVER/gitee.com"] - insteadOf=https://gitee.com -EOF +if [ -n "$GIT_SERVER" ]; then + cat >> /etc/gitconfig <<-EOF + [url "git://$GIT_SERVER/gitee.com"] + insteadOf=https://gitee.com + EOF +fi export initrd_http_host=$INITRD_HTTP_HOST export initrd_http_port=$INITRD_HTTP_PORT -- 2.23.0