mercurial update hook gives me permission denied error
-
02-06-2021 - |
Pregunta
I am using SSH to push to the central mercurial repository on the remote server.
I put in a hook so the remote repo will update:
[hooks]
changegroup = hg update >&2
when I try to push to the remote repo, the push succeeds, but I get this output:
remote: added 1 changesets with 1 changes to 1 files
remote: abort: Permission denied: /var/www/sites/businesslicenses/.hgignore
remote: warning: changegroup hook exited with status 255
any ideas for me?? thanks!
Solución
If you use SSH and don't setup a dedicated user account on your server, then you will need to ensure that:
- the necessary users are in a common group and
- newly created files belong to that group
- newly created files are group writable
See "The filesystem method" in the wiki for more information. Generally, I find that it's easier to user a dedicated user on the server and then grant people access by adding SSH public keys to .ssh/authorized_keys
.
Otros consejos
Check if /var/www/sites/businesslicenses/.hgignore is owned by the current user and is not owned by root.
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow