I';我无法将代码推入git服务器

I';我无法将代码推入git服务器,git,github,Git,Github,我无法将代码推入git服务器。请查找推入git时显示的错误 Counting objects: 7, done. Delta compression using up to 2 threads. Compressing objects: 100% (3/3), done. Writing objects: 100% (4/4), 457 bytes, done. Total 4 (delta 1), reused 0 (delta 0) Unpacking objects: 100%

我无法将代码推入git服务器。请查找推入git时显示的错误

 Counting objects: 7, done.
 Delta compression using up to 2 threads.
 Compressing objects: 100% (3/3), done.
 Writing objects: 100% (4/4), 457 bytes, done.
 Total 4 (delta 1), reused 0 (delta 0)
 Unpacking objects: 100% (4/4), done.
 fatal: Unable to create     '/home/gituser/GIT/poc.git/refs/heads/master.lock': Permission denied
 fatal: The remote end hung up unexpectedly
 fatal: The remote end hung up unexpectedly
使用Redhat 6,nginx。
请提供解决此错误的解决方案。提前谢谢大家。

在用户Andrea的帮助下,我已经解决了这个错误。下面是链接

cd
git config core.sharedRepository组
chgrp-R(用户)用户-哪个用户要推送
chmod-rg+w。
chmod g-w对象/包
chmod g+s的查找-d型
运行这些命令并尝试一下。现在您可以在git存储库中推送代码了。
再次感谢andrea和Mark。

很可能您是以不同的用户身份登录系统的,代码存储在不同的用户名中,错误消息是git正在尝试更新文件,但您登录的用户没有权限。似乎是该目录的用户权限错误,而不是git错误。我已检查了权限,它类似于drwsrwsr-x 7 gituser gituser 4096 Sep 17 11:09 poc.git。但我正在将代码从gitapp(用户)推送到服务器。谢谢mark的帮助。我已经解决了这个错误。
 cd <project.git>
 git config core.sharedRepository group
 chgrp -R (user) .  # user - which user is going to push 
 chmod -R g+w .
 chmod g-w objects/pack
 chmod g+s 'find . -type d'