Bench update error

Hi,

i wonder why i cant do bench update, its give me this error :
sigma@GSI2:~/frappe-bench$ bench update
remote: Counting objects: 56, done.
remote: Compressing objects: 100% (56/56), done.
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/home/sigma/bench-repo/bench/cli.py”, line 36, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 609, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 589, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 935, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 781, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 416, in invoke
return callback(*args, **kwargs)
File “/home/sigma/bench-repo/bench/cli.py”, line 151, in update
update_bench()
File “/home/sigma/bench-repo/bench/utils.py”, line 139, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/sigma/bench-repo/bench/utils.py”, line 61, in exec_cmd
subprocess.check_call(cmd, cwd=cwd, shell=True)
File “/usr/lib/python2.7/subprocess.py”, line 540, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘git pull’ returned non-zero exit status 1

please advise

thanks

Did you, by mistake, run bench update as root in the past?

As root, run the following.

chown -R sigma /home/sigma/bench-repo/
chown -R sigma /home/sigma/frappe-bench/apps

the error stil occured :
remote: Counting objects: 62, done.
remote: Compressing objects: 100% (62/62), done.
remote: Total 62 (delta 35), reused 0 (delta 0)
Unpacking objects: 100% (62/62), done.
From GitHub - frappe/bench: CLI to manage Multi-tenant deployments for Frappe apps
ce23b23…9c72d0a master → origin/master
Updating ce23b23…9c72d0a
Fast-forward
bench/app.py | 13 ++++++++±-
bench/cli.py | 53 +++++++++++++++++++++++±-------------------
bench/config.py | 14 +++++++±—
bench/migrate_to_v5.py | 45 +++++++++++++++++++++++++++++++++++++
bench/production_setup.py | 22 +++++++++++±-----
bench/templates/nginx.conf | 53 +++++++++++++++++++++++++++++++++±---------
bench/utils.py | 39 ++++++++++++++++++++++++++++++±
install_scripts/setup_frappe.sh | 16 +++++++±----
8 files changed, 199 insertions(+), 56 deletions(-)
create mode 100644 bench/migrate_to_v5.py
restarting
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.1’, ‘console_scripts’, ‘bench’)()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources.py”, line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File “/usr/local/lib/python2.7/dist-packages/pkg_resources.py”, line 2472, in load_entry_point
return ep.load()
File “/usr/local/lib/python2.7/dist-packages/pkg_resources.py”, line 2186, in load
[‘name’])
File “/home/sigma/bench-repo/bench/cli.py”, line 22, in
from .migrate_to_v5 import migrate_to_v5
File “/home/sigma/bench-repo/bench/migrate_to_v5.py”, line 2, in
from .release import get_current_version
File “/home/sigma/bench-repo/bench/release.py”, line 5, in
import semantic_version
ImportError: No module named semantic_version

how ?

This is a different issue,
Run sudo pip install --upgrade -e /home/sigma/bench-repo and try again

wow this works thanks…