本文介绍了GitLab:你不允许访问高手!将gitlab移至另一台服务器后的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在将我的gitlab实例移动到另一台服务器,并且遇到问题。
克隆工作正常,但推是扔错误,我不知道哪里是问题。
在gitlab日志中是没有用的。

  git push 
计数对象:5,完成。
使用多达4个线程的增量压缩。
压缩对象:100%(2/2),完成。
写入对象:100%(3/3),351字节,完成。
总计3(delta 0),重用0(delta 0)
remote:GitLab:您不允许访问主站!
remote:error:hook拒绝更新refs / heads / master
到git @ server:user / repo.git
! [remote rejected] master - > master(钩子已拒绝)
错误:无法将某些参考推送到'git @ server:user / repo.git'

我不知道问题在哪里,我改变了一点点配置。 Repos和satelites在以前的服务器符号链接到 / media / data / git / repositories 现在是 / home / git 符号链接到 / media / disk / git 但我不认为这是问题所在。

编辑://
gitlab:检查是一切还好gitlab-shell检查是确定的

解决方案

[TL:DR]



经过大量的试验和错误,我找到了解决这个问题的方法(无论如何)。


$ b

cd / home / git / repositories



-rf * / * / hooks / update





我从6.3-> 6.9依次升级,前端没有任何问题,但(愚蠢的是我)没有检查推送&每次都拉,所以我不确切知道这是从哪里开始发生的。我怀疑6.7升级后。 SSH和HTTP推送&拉停止工作,但有轻微不同的错误。我搜索了一些线程所说的存储库目录上的符号链接,我也运行了chmod和chown来确保git可以访问所有的存储库。我还检查了NGINX config,确保它指向正确的IP / FQHN。没有骰子,同样的错误。我终于找到了,这导致我检查了一些东西,最后找到了上面的解决方案。



我不知道这个修复是否是因为每个repo的hooks文件夹中的'update'文件都是符号链接,或者是因为文件本身存在某些内容,但现在我可以推动&拉正常。


I'm moving my gitlab instance to another server and I run to problem.clone is working fine, but push is throwing error, and I can't figure out where is problem.In gitlab logs is nothing usefull.

git push
Counting objects: 5, done.
Delta compression using up to 4 threads.
Compressing objects: 100% (2/2), done.
Writing objects: 100% (3/3), 351 bytes, done.
Total 3 (delta 0), reused 0 (delta 0)
remote: GitLab: You are not allowed to access master! 
remote: error: hook declined to update refs/heads/master
To git@server:user/repo.git
! [remote rejected] master -> master (hook declined)
error: failed to push some refs to 'git@server:user/repo.git'

I don't know where is problem, I change little bit configuration. Repos and satelites where on previous server symlinks to /media/data/git/repositories now is /home/git symlink to /media/disk/git But i don't think that is the problem.

EDIT://gitlab:check is everything OK also gitlab-shell check is OK

解决方案

[TL:DR]

After loads of frustrated hours and lots of trial and error, I found a solution to this problem (for me anyway).

cd /home/git/repositories

rm -rf */*/hooks/update

[Explanation]

I upgraded from 6.3 -> 6.9 sequentially with no problems on the front end, but (silly me) didn't check push & pulls each time so I don't know exactly where this started happening. I suspect after the 6.7 upgrade. Both SSH and HTTP push & pulls stopped working but with slightly different errors. I searched for symlinks on the repositories directory like some threads said, I also ran chmod's and chown's to ensure git had access to all the repositories. I also checked NGINX config's to ensure it was pointing to the right IP/FQHN. No dice, same errors. I finally found this issue which lead me check a few things and finally to the solution above.

I'm not sure if this fix is because the 'update' files in each repo's hooks folder were symlinks, or because of something in the files themselves, but now I can push & pull as normal.

这篇关于GitLab:你不允许访问高手!将gitlab移至另一台服务器后的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-30 01:06