Update error again and again

hi all
i think there is a serious problem with the update :

root@ubuntu:/home/frappe/frappe-bench# bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
Already up-to-date.
remote: Counting objects: 12, done.
remote: Total 12 (delta 8), reused 8 (delta 8), pack-reused 4
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
remote: Counting objects: 12, done.
remote: Total 12 (delta 8), reused 8 (delta 8), pack-reused 4
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
INFO:bench.utils:./env/bin/pip install Pillow
Requirement already satisfied: Pillow in ./env/lib/python2.7/site-packages
Requirement already satisfied: olefile in ./env/lib/python2.7/site-packages (from Pillow)
INFO:bench.app:pulling frappe
INFO:bench.utils:git pull upstream master
remote: Counting objects: 5, done.
remote: Total 5 (delta 3), reused 3 (delta 3), pack-reused 2
error: insufficient permission for adding an object to repository database .git/objects
fatal: failed to write object
fatal: unpack-objects failed
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 11, in
load_entry_point(‘bench’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/.bench/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 “/home/frappe/.bench/bench/commands/update.py”, line 62, in update
_update(pull, patch, build, bench, auto, restart_supervisor, requirements, no_backup, upgrade, force=force, reset=reset)
File “/home/frappe/.bench/bench/commands/update.py”, line 79, in _update
pull_all_apps(bench_path=bench_path, reset=reset)
File “/home/frappe/.bench/bench/app.py”, line 170, in pull_all_apps
remote=remote, branch=get_current_branch(app, bench_path=bench_path)), cwd=app_dir)
File “/home/frappe/.bench/bench/utils.py”, line 130, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull upstream master

any solution
i tris hard reset already same issue

@SOLOSOFT,

you have a permissions issue on bench directory.

the following url might help

hi @makarand_b i already open that url but where i can find the git repo i dont see any repo in the frappe directory

@SOLOSOFT,

search for .bench directory, bench directory is usually hidden

after executing commands issue remains
the problem is before 1h i did a bench update and passed without any issue but after i did some modifications in py report file i did a bench update coz if not i get the same old message before i modify it (other weared problem) @fahimalizain know about it he already experinced it with me live.

any other suggestions.

@SOLOSOFT

did you checked the file permissions about the
py report file you created?

chown

by the way there is no .git/objects or .bench/objects :no_mouth:

i didnt change anything as i said i already did a bench update an one before so why the first one get executed and second time no??

.bench repo :

drwxrwsr-x 6 frappe frappe  4096 Jun 13 13:54 bench
drwxrwsr-x 2 frappe frappe  4096 Mar  3 15:05 bench.egg-info
-rw-rwxr-- 1 root   frappe   650 Jun  6 23:44 completion.sh
drwxrwsr-x 2 frappe frappe  4096 Jun  6 23:44 install_scripts
-rw-rwxr-- 1 root   frappe 35121 Jun  6 23:44 LICENSE.md
-rw-rwxr-- 1 root   frappe   116 Jun  6 23:44 MANIFEST.in
drwxrwsr-x 4 frappe frappe  4096 Jun  6 23:44 playbooks
-rwxrwxr-x 1 root   frappe  6165 Jun  6 23:44 README.md
-rw-rwxr-- 1 root   frappe   100 Jun  6 23:44 requirements.txt
-rw-rwxr-- 1 root   frappe   846 Jun  6 23:44 setup.py
drwxrwsr-x 4 frappe frappe  4096 Jun  6 23:44 vm

Sorry I’m not a professional.

In this case is the best to make a full restore
on a backup from yesterday.

Hope this helps.