$ git clone -n https://gitee.com/src-anolis-os/hostname.git /var/lib/mock/dist-an23-build-79266-40678/root/chroot_tmpdir/scmroot/hostname Cloning into '/var/lib/mock/dist-an23-build-79266-40678/root/chroot_tmpdir/scmroot/hostname'... $ git reset --hard origin/a23 HEAD is now at 6105080 fix build failed in rpmbuild with no-root user