我通过简单地将用户名添加到如下url来解决这个问题,
之前: https://gitlab.com/gitlab_user/myrepo.git
之后: https://gitlabusername@gitlab.com/gitlab_user/myrepo.git