Receiving Error Code: 255 when pushing to Mercurial repo from Eclipse Plugin
Your webserver can't write into the repository. You can either
- change the permissions in the local repo so that the webserver get write permissions there (which means you need to set up write permissions with chmod for all files and directories under (and including) .hg, also you need to set the sticky-bit to all directories)
- give the webserver an own repo, which is owned by the server.
Giving the web serve a repo of its own looks like this:
$ sudo bash
# mkdir /srv/repo-base
# chown www-data /srv/repo-base
# cd /srv/repo-base
# su -c "hg clone /path/to/current/repo web-repo-name" www-data
# vi /etc/apache2/sites-available/$SITE_CONFIG_FILE # change the repo path to /srv/repo-base/web-repo-name
# /etc/init.d/apache2 reload
A drawback of this method is that you need to push via http even on the machine with the webserver, since as a normal user you don't have write permissions to the webserver repo.
Jivings
I am a passionate web developer specialising in responsive design and dynamic javascript visualisations. In my free time you'll likely catch me Reviewing Code or moderating the Raspberry Pi SE. SOreadytohelp
Updated on March 23, 2020Comments
-
Jivings over 4 years
I am using HgEclipse from here: http://www.javaforge.com/project/HGE
I have created a new repository on my server to test the plugin. I cloned the repository, added some files, committed and attempted to push but received the following error message...
abort: HTTP Error 500: Internal Server Error. Command line: /home/james/workspace/project:hg -y push http://***@[repository location], error code: 255
From some Googling I can find that the 255 error is to do with Authentication, but the password is correct, otherwise I wouldn't be able to clone in the first place.
Any help or suggestions would be much appreciated.
Thanks
EDIT: After updating my system to the latest versions I am now also getting this from the command line when pushing (which was previously working):
abort: HTTP Error 500: Permission denied: .hg/store/data/path-to-file.i
-
Rudi almost 13 yearsCan you look at the servers error log?
HTTP Error 500: Internal Server Error.
looks like that something on the server is going wrong. -
Jivings almost 13 yearsI couldn't find where the log was being outputted, any idea?
-
Jivings almost 13 yearsNo errors were in the Apache error log. I have now (finally) managed to update my decrepid Ubuntu system. So have the latest version of Mercurial. This is now giving me perhaps a more informative error? Original question has been updated.
-
-
Jivings almost 13 yearsSorry it's taken me so long to get back to this, I've been having some trouble with my webserver in the meantime. Changing the permissions has no effect, even when they are 777 it still says permission denied.
-
Jivings almost 13 yearsNever mind, I ran chown www-data -R on the repository and that seems to have done it. Thanks for your help.
-
Admin over 4 yearsI am getting this error while trying to update and push, even though I have been working with the sevrer for a few months now; i.e. permission related issues are not the reason. Even when I choose the option "Discard Local Changes", I can neither update nor push. What could be the reason?
-
Rudi over 4 years@Hannes Without any knowledge of your infrastructure I can't do anything. You have to look into the server logs to know what happens there.