GitLab: Can't push code to server?

后端 未结 6 1511
傲寒
傲寒 2021-02-09 07:57

I\'ve installed GitLab on an Ubuntu Server. Everything seems to work fine except I can\'t push/pull/clone to/from the server.

When I push I get the general error message

6条回答
  •  南旧
    南旧 (楼主)
    2021-02-09 08:06

    In my case the reason was an enforced redirect to https by nginx. Check if the git user can use the gitlab-api by running

    sudo -u git -H /home/git/gitlab-shell/bin/check
    

    on the server. In my case the output was

    Check GitLab API access: FAILED. code: 301
    

    I had to change the gitlab_url in /home/git/gitlab-shell/config.yml to https://

提交回复
热议问题