tshepang
tshepang

Reputation: 12459

I am failing to commit to mercurial repo

I tried committing to a local hg repo and it refuses:

trouble committing plot.py!
note: commit message saved in .hg/last-message.txt
abort: Permission denied: /home/md/md_perf/.hg/store/data/plot.py.i

Upvotes: 2

Views: 1155

Answers (2)

Thalinda Bandara
Thalinda Bandara

Reputation: 1079

So i Got the kind of same issues my issues was when i try to commit i am getting error that user name is not setup so when i try to add it this way sudo hg config --edit i get this error the permission error and i have tried the above method and wasn't able to fix the issues then at the end i had no choice other than adding the user manually **

Steps To do

code .hg/hgrc you can use any ide here i am using vscode

Then Add user like this and please make sure it's the same as your repository in remote so mine was thalinda.bandara so i have added that and email too

[ui] username = Your Name <[email protected]> and yes your email should be in <email>

**

Upvotes: 0

Ry4an Brase
Ry4an Brase

Reputation: 78330

Your file permissions are messed up inside the local repository -- probably someone else pushed or committed to that repository without making sure they were leaving the permissions in a state usable by your whole group. Try these, with the appropriate substitutions, and sudo if necessary:

chgrp -R yourgroup /home/md/md_perf
chmod -R g+rwX /home/md/md_perf
find /home/md/md_perf -type d -print0 | xargs -0 chmod g+s

Upvotes: 4

Related Questions