I tried to push the master branch from a client to a server which installed the gitlab. However, I got the following error info:
[root@warehouse git-sample]# git push origin master
[email protected]'s password:
Counting objects: 3, done.
Writing objects: 100% (3/3), 224 bytes | 0 bytes/s, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: No user or key was provided.
To [email protected]:ite-pon/git-sample.git
! [remote rejected] master -> master (pre-receive hook declined)
error: failed to push some refs to '[email protected]:ite-pon/git-sample.git'
It looks like the gitlab setup a pre-receive hook into the project, but blocked the push operation.
Does anybody has any idea to deal with this issue? Thx~ :)
//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
Below are the detail configuration and information both for server and client:
Server: GitLab & Git & Repository Info
[root@warehouse git-sample.git]# pwd
/opt/gitlab/apps/gitlab/repositories/ite-pon/git-sample.git
Gitlab record the client's ssh pub key (no enough reputation to send img :()
Setup Administrator (client user) as Master for this project, and as Owner for the domain.
Server: Configuration
[root@warehouse repositories]# grep git /etc/passwd
git:x:502:502:Git:/opt/gitlab/apps/gitlab/repositories:/opt/gitlab/git/bin/git-shell
Client: Workspace Info
[root@warehouse git-sample]# pwd
/root/workspaces/git-sample/git-sample
[root@warehouse git-sample]# ls
readme.txt
[root@warehouse git-sample]# git branch
dev
* master
[root@warehouse git-sample]# git remote -v
origin [email protected]:ite-pon/git-sample.git (fetch)
origin [email protected]:ite-pon/git-sample.git (push)
Client: SSH & Git Info
[root@warehouse git-sample]# git config --global user.name
Administrator
[root@warehouse git-sample]# git config --global user.email
[email protected]
[root@warehouse git-sample.git]# ls -l ~/.ssh/id_rsa.pub
-rw-r--r-- 1 root root 413 7月 1 15:51 /root/.ssh/id_rsa.pub
It seems that you reached the bug that just documented on https://gitlab.com/gitlab-org/gitlab-ce/issues/2156 -- the workaround being to remove the key from the authorized_keys files on the server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With