简体   繁体   English

HG推送失败; 权限被拒绝.hg / store / lock

[英]HG Push Failed; Permission denied .hg/store/lock

I have been trying to setup a mercurial repository on my server so that my team can work from theirs. 我一直在尝试在我的服务器上设置一个mercurial存储库,以便我的团队可以使用他们的工作。 I am running Ubuntu server 10.4 and I did the install of mercurial using apt-get. 我正在运行Ubuntu服务器10.4,我使用apt-get安装了mercurial。 Now this all went smoothly. 现在一切顺利。

I init a dir with hg just fine, I setup the hgrc as follows: 我用hg初始化一个目录就好了,我按如下方式设置了hgrc:

[web]
push_ssl = False
allow_push = *

[trusted]
users = *
groups=

then I run hg serve . 然后我运行hg serve The server begins listening. 服务器开始收听。 I can clone this repository to another computer but when I try and push my changes i get the error: 我可以将此存储库克隆到另一台计算机,但当我尝试推送我的更改时,我收到错误:

C:\Users\UserName\Project1>hg push http://MyInternalIP:8000
pushing to http://MyInternalIP:8000
searching for changes
abort: HTTP Error 500: Internal Server Error

On the server side I get the following error: 在服务器端,我收到以下错误:

LockUnavailable: [Errno 13] Permission denied: '/home/UserName/projects/Project1/.hg/store/lock'

If anyone has a solution to how to fix this that would be amazing. 如果有人有解决方案如何解决这个问题会很惊人。 I have googled and found people with similar issues and they say that it may have something to do with the web user not having permissions but I am new to all of this and none of them give solutions on how to fix the issue. 我用Google搜索并发现有类似问题的人,他们说这可能与没有权限的网络用户有关,但我是所有这一切的新手,他们都没有提供解决问题的方法。 Thanks for your time. 谢谢你的时间。

You must allow write access to the repository directories to the user running the Mercurial server process. 您必须允许对运行Mercurial服务器进程的用户的存储库目录具有写访问权限。 Ie the user account running hg serve must be able to write to /home/UserName/projects/Project1/ 即运行hg serve的用户帐户必须能够写入/home/UserName/projects/Project1/

BTW can you provide more details as to what command line you used to clone the repository? BTW是否可以提供有关用于克隆存储库的命令行的更多详细信息?

In my case with mercurial repository on redmine 在我的情况下与redmine上的mercurial存储库

HTTP Error: 500 (Permission denied) HTTP错误:500(权限被拒绝)

Run

chown -R www-data /path/to/repos

on the server, it worked for me. 在服务器上,它对我有用。

( Fuente ) Fuente

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM