Issue #3853 resolved

I cannot ba able to sychronise repos due to permission denied error

bob chege
created an issue

I am trying to synchronise my repos using tortoise hg on mercurial but i keep on getting the following error.

ealm: Bitbucket.org HTTP user: bobchege searching for changes abort: Permission denied: /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1loaddata/parentsportal.sql.i [command returned code 255 Mon Apr 2 23:33:20 2012] gradebookv1%

This is inspite the fact that I am sure that my login credentials are correct. What could be the problem?

Comments (12)

  1. Brodie Rao staff

    It sounds like TortoiseHg can't read the file /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1__loaddata/parentsportal.sql.i.

    Can you confirm that the user running THG has file system access to that repo?

  2. bob chege reporter

    (Reply via bobc...@gmail.com):

    Thanks for the reply. I had a better look at the file above that you have indicated

    /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1__loaddata/parentsportal.sql.i.

    and I noticed that the whole .hg folder is not highlighted with the green tick while all other folders and documents including .hgignore and .classpath are after committing. Could this be the problem , because the folders are not in a location requiring extra permissions?

    I have tried to get the .hg folder to commit to no avail though. If that is the problem, how do I get the .hg folder to commit?

  3. Brodie Rao staff

    I think the green tick is just for files in your repo's working copy; the .hg folder contains all the repo's internal data, so that doesn't count.

    Did you recently copy the repo from another machine/file system with weird permissions? You might want to try chowning/chmod'ing the .hg folder.

  4. bob chege reporter

    (Reply via bobc...@gmail.com):

    Thanks Brodie for the reply. No I haven't copied it from anywhere else. I have always been committing from the same code-base, even from before. But I recently set up another new repo on bit bucket and cloned the new repo to my local machine then added some code then pushed the code back on to the new repo on BB.thats it .Then I then tried to push new code to the older repo (the one I am writing to you about with the problem).When I tried to push the code that is when the error occured.

    However I changed the permissions of .hg to 777 and also the whole project as below:

    drwxrwxrwx 4 chege chege 4096 2012-04-03 10:16 .hg

    But I still get the same error :

    pushing to https://bobchege@bitbucket.org/bobchege/gradebookv1/ http authorization required realm: Bitbucket.org HTTP user: bobchege searching for changes abort: Permission denied: /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1loaddata/parentsportal.sql.i [command returned code 255 Wed Apr 4 21:39:29 2012]

  5. bob chege reporter

    (Reply via bobc...@gmail.com):

    I dont know if it means anything but the new repo is using Git.

    On Wed, Apr 4, 2012 at 9:47 PM, Bob Chege <bobchege@gmail.com> wrote:

    Thanks Brodie for the reply. No I haven't copied it from anywhere else. I have always been committing from the same code-base, even from before. But I recently set up another new repo on bit bucket and cloned the new repo to my local machine then added some code then pushed the code back on to the new repo on BB.thats it .Then I then tried to push new code to the older repo (the one I am writing to you about with the problem).When I tried to push the code that is when the error occured.

    However I changed the permissions of .hg to 777 and also the whole project as below:

    drwxrwxrwx 4 chege chege 4096 2012-04-03 10:16 .hg

    But I still get the same error :

    pushing to https://bobchege@bitbucket.org/bobchege/gradebookv1/ http authorization required realm: Bitbucket.org HTTP user: bobchege searching for changes abort: Permission denied: /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1loaddata/parentsportal.sql.i [command returned code 255 Wed Apr 4 21:39:29 2012]

    On Wed, Apr 4, 2012 at 1:41 AM, Brodie Rao <issues-reply@bitbucket.org>wrote:

  6. Brodie Rao staff

    Can you try pushing from the command line using "hg push --traceback" and paste the output here? That should tell us exactly where the permission denied error's coming from.

  7. bob chege reporter

    (Reply via bobc...@gmail.com):

    Hi, I tried to push from terminal and here is my output

    chege@chege-laptop:/workspace/Eclipse/gradebookv1$ hg push --traceback pushing to https://bobchege@bitbucket.org/bobchege/gradebookv1/ http authorization required realm: Bitbucket.org HTTP user: bobchege password: searching for changes Traceback (most recent call last): File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 87, in _runcatch return _dispatch(req) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 684, in _dispatch cmdpats, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 466, in runcommand ret = _runcommand(ui, options, cmd, d) File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 738, in _runcommand return checkargs() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 692, in checkargs return cmdfunc() File "/usr/lib/pymodules/python2.6/mercurial/dispatch.py", line 681, in <lambda> d = lambda: util.checksignature(func)(ui, *args, cmdoptions) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 454, in check return func(*args, kwargs) File "/usr/lib/pymodules/python2.6/mercurial/commands.py", line 4307, in push newbranch=opts.get('new_branch')) File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 1534, in push ret = remote.unbundle(cg, remote_heads, 'push') File "/usr/lib/pymodules/python2.6/mercurial/wireproto.py", line 300, in unbundle ret, output = self._callpush("unbundle", cg, heads=heads) File "/usr/lib/pymodules/python2.6/mercurial/httprepo.py", line 193, in _callpush tempname = changegroup.writebundle(cg, None, type) File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 95, in writebundle chunk = getchunk(cg) File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 26, in getchunk d = readexactly(stream, 4) File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 17, in readexactly s = stream.read(n) File "/usr/lib/pymodules/python2.6/mercurial/changegroup.py", line 143, in read return self._stream.read(l) File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 862, in read for chunk in self.iter: File "/usr/lib/pymodules/python2.6/mercurial/util.py", line 840, in splitbig for chunk in chunks: File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 1780, in gengroup filerevlog = self.file(fname) File "/usr/lib/pymodules/python2.6/mercurial/localrepo.py", line 614, in file return filelog.filelog(self.sopener, f) File "/usr/lib/pymodules/python2.6/mercurial/filelog.py", line 35, in init "/".join(("data", path + ".i"))) File "/usr/lib/pymodules/python2.6/mercurial/revlog.py", line 240, in init f = self.opener(self.indexfile) File "/usr/lib/pymodules/python2.6/mercurial/store.py", line 377, in call return self.opener(self.encode(path), mode, *args, kw) File "/usr/lib/pymodules/python2.6/mercurial/scmutil.py", line 232, in call fp = util.posixfile(f, mode) IOError: [Errno 13] Permission denied: '/home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1loaddata/parentsportal.sql.i' abort: Permission denied: /home/chege/workspace/Eclipse/gradebookv1/.hg/store/data/scripts/gradebookv1loaddata/parentsportal.sql.i

  8. Brian Nguyen staff

    Hi Bob,

    Apologies for the delay in responding. Looking at the Mercurial code, it still looks like its a permission problem in the file system.

    Just to ease my doubts, could you try running

    chmod -R 777 .hg

    This will update the permissions on all files and directories in the .hg directory.

    In the meantime I will continue to check through the code to see if there are any other clues I can find.

    Cheers, Brian

  9. bob chege reporter

    (Reply via bobc...@gmail.com):

    Thanks Brian for your reply. Changing permissions to full on the .hg folder solved the issue totally .I am now able to synchronize my local repo and the BB one with no problem . I am however baffled how and when these permissions changed . However thanks again since everything works perfectly now.

    Best regards

  10. Log in to comment