When try bench update occur this error please can you help me

INFO:bench.utils:updating bench
error: cannot open .git/FETCH_HEAD: Permission denied

Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/bench-repo/bench/cli.py”, line 40, in cli
bench_command()
File “/home/mohamed/.local/lib/python2.7/site-packages/click/core.py”, line 716, in call
return self.main(*args, **kwargs)
File “/home/mohamed/.local/lib/python2.7/site-packages/click/core.py”, line 696, in main
rv = self.invoke(ctx)
File “/home/mohamed/.local/lib/python2.7/site-packages/click/core.py”, line 1060, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/home/mohamed/.local/lib/python2.7/site-packages/click/core.py”, line 889, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/home/mohamed/.local/lib/python2.7/site-packages/click/core.py”, line 534, in invoke
return callback(*args, **kwargs)
File “/bench-repo/bench/commands/update.py”, line 35, in update
update_bench()
File “/bench-repo/bench/utils.py”, line 227, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/bench-repo/bench/utils.py”, line 127, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

are u running command as root?

yes i running root the problem not only this bench but all bench given this error when try bench update

Resolved here:
https://discuss.erpnext.com/t/when-updating-bench/10790/5?u=pratu16x7

1 Like

thank you solved
@pratu16x7