[gitlab-shell] fix https://gitlab.com/gitlab-org/gitlab-ce/issues/838