Gitlab: no user or key was provided

I tried to pull the main branch from the client to the server that installed gitlab. However, I received the following error information:

[ root@warehouse git-sample]# git push origin master git@192.168.7.82 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 git@192.168.7.82 :ite-pon/git-sample.git ! [remote rejected] master -> master (pre-receive hook declined) error: failed to push some refs to ' git@192.168.7.82 :ite-pon/git-sample.git' 

It seems that gitlab has set up a preliminary reception in the project, but has blocked the push operation.

Does anyone have any ideas to solve this problem? thanks ~ :)

//////////////////////////////////////////////////// //////////////////////////////////////////////////// ////////////////////////////////////////////////////

Below are the detailed settings and information for both the server and the client:

Server: GitLab and Git and repository information

 [ root@warehouse git-sample.git]# pwd /opt/gitlab/apps/gitlab/repositories/ite-pon/git-sample.git 
  • Gitlab writes the ssh pub client key (there is not enough reputation to send img :()

  • The installation administrator (client user) as the wizard for this project and as the 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 information

 [ 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 git@192.168.7.82 :ite-pon/git-sample.git (fetch) origin git@192.168.7.82 :ite-pon/git-sample.git (push) 

Client: SSH and Git Information

 [ root@warehouse git-sample]# git config --global user.name Administrator [ root@warehouse git-sample]# git config --global user.email admin@gitlab.xxxxxxxxxxx.com [ 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 
+5
source share
2 answers

It seems that you have reached the error that has just been documented at https://gitlab.com/gitlab-org/gitlab-ce/issues/2156 - a workaround is to remove the key from authorized_keys files on the server.

+3
source

It helps me. This command accepts all keys from database records and updates in authorized_keys file.

For Omnibus packages:

 sudo gitlab-rake gitlab:shell:setup 

For installations from the source:

 cd /home/git/gitlab sudo -u git -H bundle exec rake gitlab:shell:setup RAILS_ENV=production 

http://doc.gitlab.com/ce/raketasks/maintenance.html#rebuild-authorized_keys-file

0
source

All Articles