Hi everyone,
I’m facing this issue for a while. To summarize I’m trying to update ERPNext by doing the following steps:
Login to VM using SSH.
Swirch user to “frappe” user.
Navigate to frappe-bench folder.
execute “bench update” command.
The error shown below is presented in the terminal.
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
error: cannot open .git/FETCH_HEAD: Permission denied
Traceback (most recent call last):
File "/usr/local/bin/bench", line 11, in <module>
load_entry_point('bench', 'console_scripts', 'bench')()
File "/home/mahsooladmin/.bench/bench/cli.py", line 40, in cli
bench_command()
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/local/lib/python3.5/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/mahsooladmin/.bench/bench/commands/update.py", line 36, in update
update_bench()
File "/home/mahsooladmin/.bench/bench/utils.py", line 265, in update_bench
exec_cmd("git pull", cwd=cwd)
File "/home/mahsooladmin/.bench/bench/utils.py", line 161, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
I searched for the cases and i stumbled on the linked also this one post with a suggested solution but with no avail unfortunately. Your help and support is highly appreciated in helping me resolve this issue.
Also below is the permissions for the three FETCH_HEAD files that the update command fails to access. Im really getting stuck in here and would highly appreciate any help. Thanks.