I've been trying to setup mercurial for the last couple of
> days and made good progress. I'm able to clone and browse
> the repository, but pushing my changes back onto the server
> causes mercurial to throw an exception.
>
> Here's what happens when I try to push
>
> C:/temp/project>hg push
> https://user:password@www.domain.net/hg/project
>
> from the command line I get this
>
> pushing to https://www.domain.net/hg/project
> searching for changes
> abort: HTTP Error 500: Internal Server Error
>
> When I looked into the apache error log, I found that an
> exception is thrown:
>
> -------
> ..
> [error] Not trusting file /var/hg/project/.hg/hgrc from
> untrusted user root, group www-data
The SyntaxError reported at the end of the log is *perhaps* a side
effect of the first error (not trusting file).
You can try that:
Check that your Apache server runs as user www-data and group www-data
(this is the default) and change owner and group of all files and
directories under /var/hg/project to user www-data and group www-data:
$ cd /var/hg
$ chown -hR www-data /your repos
apache Mercurial HTTP Error 500: Internal Server Error问题解决方法
最新推荐文章于 2026-06-20 15:15:05 发布
本文档详细记录了在使用Mercurial进行代码版本控制时遇到的推送异常问题及解决方案。作者尝试推送更改到服务器时遇到HTTP 500内部错误,并在Apache错误日志中发现信任文件权限的问题。通过调整文件所有者和组为www-data,解决了Mercurial不信任文件的问题。
2842

被折叠的 条评论
为什么被折叠?



