Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab push. You are not allowed to access master

Tags:

git

gitlab

I have set up my own server (at home) and i am reaching it via putty on my main PC.

Gitlab is installed and configured, i can reach gitlab and log in. But when i try to push files (through HTTP) to my own project i get this message:

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'

I am using HTTP instead of SSH because there i get "Access denied", so basically neither is working.

When i run

sudo bundle exec rake gitlab:check RAILS_ENV=production

It tells me that the Sidekiq script is not running (which i can't seem to fix, not sure if it's related to this problem) Ofcourse it tells me that the repository is empty. The rest seems fine.

I checked

.ssh/authorized_keys

Which seem correct as well, the key there is the same as my saved key.

And my repos_path in gitlab-shell/config.yml looks good, not using symlink:

repos_path: /home/git/repositories/

I have run the official gitlab installation guide.

Can anyone help me with this problem? Thanks in advance

UPDATE

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
like image 368
AuStrike Avatar asked May 31 '14 17:05

AuStrike


1 Answers

I had this problem because I had master as a protected branch

Protect branch won't accept push

Once I unprotected the branch I was able to push fine

like image 113
Neil Avatar answered Sep 21 '22 17:09

Neil