昨天我在我的服务器上安装了GitLab Community Edition。安装顺利,但是当我们将数据或文件推送到GitLab服务器时会发生此错误:
Password for 'http://naman550.dx@gmail.com@112.196.23.228':
Counting objects: 6, done.
Delta compression using up to 2 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (6/6), 431 bytes | 0 bytes/s, done.
Total 6 (delta 0), reused 0 (delta 0)
remote: GitLab: API is not accessible
To http://112.196.23.228/Naman/mt-test.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to 'http://112.196.23.228/Naman/mt-test.git'
答案 0 :(得分:1)
检查以确保分支主机不受保护。据我所知,默认情况下主分支受到保护。 Example
您可以在项目设置中取消保护/保护分支。
您还可以检查位于/opt/gitlab/embedded/service/gitlab-shell/config.yml
的gitlab-shell配置中是否正确设置了gitlab_url。确保在编辑此文件后运行sudo gitlab-ctl restart
。