【发布时间】:2014-05-31 17:19:11
【问题描述】:
我已经设置了自己的服务器(在家里),我通过我的主 PC 上的 putty 访问它。
Gitlab 已安装并配置完毕,我可以访问 gitlab 并登录。 但是当我尝试将文件(通过 HTTP)推送到我自己的项目时,我收到了这条消息:
POST git-receive-pack (381 bytes)
remote: GitLab: You are not allowed to access master![K
remote: error: hook declined to update refs/heads/master[K
To http://myserver.com/root/push2jump.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'http://myserver.com/root/push2jump.git'
我使用 HTTP 而不是 SSH,因为我得到“拒绝访问”,所以基本上两者都不起作用。
当我跑步时
sudo bundle exec rake gitlab:check RAILS_ENV=production
它告诉我 Sidekiq 脚本没有运行(我似乎无法修复,不确定是否与此问题有关) 当然它告诉我存储库是空的。其余的似乎都很好。
我检查了
.ssh/authorized_keys
这似乎也是正确的,那里的密钥与我保存的密钥相同。
我在 gitlab-shell/config.yml 中的 repos_path 看起来不错,没有使用符号链接:
repos_path: /home/git/repositories/
我已经运行了官方的 gitlab 安装指南。
谁能帮我解决这个问题? 提前致谢
更新
System information
System: Ubuntu 12.04
Current User: git
Using RVM: no
Ruby Version: 2.0.0p481
Gem Version: 2.0.14
Bundler Version:1.6.2
Rake Version: 10.3.1
Sidekiq Version:2.17.0
GitLab information
Version: 6.9.2
Revision: e46b644
Directory: /home/git/gitlab
DB Adapter: mysql2
URL: ***
HTTP Clone URL: ***/some-project.git
SSH Clone URL: ***:some-project.git
Using LDAP: no
Using Omniauth: no
GitLab Shell
Version: 1.9.4
Repositories: /home/git/repositories/
Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/local/bin/git
【问题讨论】:
-
看起来有点像github.com/gitlabhq/gitlabhq/issues/7025和github.com/gitlabhq/gitlabhq/issues/6623(你用的是什么Gitlab版本?)
-
感谢您的回复,我用系统信息更新了我的问题。这些问题似乎在使用 LDAP 时发生,但我不是。但我会调查它,你永远不会知道。
-
听起来像是服务器端的钩子拒绝了推送。也许 master 分支被锁定在 GitLab 上,而您没有对 repo 的 master 访问权限?