Bench update throws error

Hello, i have tried everything with no luck, when I try to run bench update at bench directory level, it throws the following error: Please Help!

erpnext@ubuntu:~/frappe-dev$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
fatal: Not a git repository (or any of the parent directories): .git
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench==4.1.0’, ‘console_scripts’, ‘bench’)()
File “/usr/local/lib/python2.7/dist-packages/bench/cli.py”, line 40, in cli
bench_command()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 722, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 697, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 1066, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 895, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 535, in invoke
return callback(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/bench/commands/update.py”, line 36, in update
update_bench()
File “/usr/local/lib/python2.7/dist-packages/bench/utils.py”, line 261, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/usr/local/lib/python2.7/dist-packages/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

I think you need to be in the ~/frappe-bench subdir

I think there is a problem with your bench repo. was it cloned correctly ?

cd into the directory where you cloned the bench repo and execute pip install -e .
Then come back into frappe-bench and do a bench update

1 Like

Hi, I thought the same thing, so I made a clean install and then it worked! thanks.

1 Like

Hi, I will try this in the VM that have the problem, to see if it works, thanks!