Bench update gives error

remote: Counting objects: 20, done.
remote: Compressing objects: 100% (18/18), done.
remote: Total 20 (delta 9), reused 6 (delta 2)
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/chandu/bench-repo/bench/cli.py”, line 38, in cli
return bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 610, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 590, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 936, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 782, 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/chandu/bench-repo/bench/cli.py”, line 154, in update
update_bench()
File “/home/chandu/bench-repo/bench/utils.py”, line 139, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/home/chandu/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

Looks like bad permissions.

sudo chown -R chandu  /home/chandu/frappe-bech
sudo chown -R chandu  /home/chandu/bench-repo

This happens if you run bench update as root on older installations. Please always run bench update as the user chandu

Hi Sir
sudo chown -R chandu /home/chandu/frappe-bech
This command gives this output
chandu@myerp:~/eipl/frappe-bench$ sudo chown -R chandu /home/chandu/frappe-bech
chown: cannot access ‘/home/chandu/frappe-bech’: No such file or directory

Please adjust the path s as per your installation. Frappe-bench is located
in eipl it. seems

Hi Sir
i am confused
chandu@myerp:~/eipl/frappe-bench$ cd …
chandu@myerp:~/eipl$ cd …
chandu@myerp:~$ sudo chown -R chandu /home/chandu/frappe-bech
chown: cannot access ‘/home/chandu/frappe-bech’: No such file or directory
chandu@myerp:~$ cd eipl/
chandu@myerp:~/eipl$ sudo chown -R chandu /home/chandu/frappe-bech
chown: cannot access ‘/home/chandu/frappe-bech’: No such file or directory
chandu@myerp:~/eipl$ ls
frappe-bench
chandu@myerp:~/eipl$ cd frappe-bench/
chandu@myerp:~/eipl/frappe-bench$ ls
apps env Procfile setup_frappe.sh.2
config FETCH_HEAD setup_frappe.sh setup_frappe.sh.3
config.json logs setup_frappe.sh.1 sites
chandu@myerp:~/eipl/frappe-bench$

Run

sudo chown -R chandu {{path to frappe-bench}}
sudo chown -R chandu {{path to bench-repo }}

sorry path missed
sudo chown -R chandu /home/chandu/eipl/frappe-bech AND also letter missing in bench

Sir
sorry i was missed path (/home/chandu/eipl/frappe-bench)
frappe-bench is working in below path
but bench-repo is given error in same path

chandu@myerp:~$ sudo chown -R chandu /home/chandu/eipl/frappe-bench
chandu@myerp:~$ sudo chown -R chandu /home/chandu/eipl/bench-rapo
chown: cannot access ‘/home/chandu/eipl/bench-rapo’: No such file or directory
chandu@myerp:~$

help me to complete the command.
chandu@myerp:~$ sudo chown -R chandu /home/chandu/eipl/frappe-bench
chandu@myerp:~$ sudo chown -R chandu /home/chandu/eipl/bench-rapo
chown: cannot access ‘/home/chandu/eipl/bench-rapo’: No such file or directory