Updating error is coming

pls help
my system is updating since 2 days
error
Your system is being updated. Please refresh again after a few moments

Hi @Anmol_b1994, I believe you have an error when you did Bench Update or Bench Migrate. Try updating again and see the log where it was stucked.

administrator@Server:~/erpnext$ bench update
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
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 “/opt/bench/bench-repo/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 “/opt/bench/bench-repo/bench/commands/update.py”, line 36, in update
update_bench()
File “/opt/bench/bench-repo/bench/utils.py”, line 261, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/opt/bench/bench-repo/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
administrator@Server:~/erpnext$

i have done git pull it shows that administrator@Server:~/erpnext/apps/frappe$ git pull
Already up-to-date.

try bench update --reset

(if u have not done any code-level customizations) I see permission denied… make sure yo user has sudo priviledges and is not root.

if it really has finished updating, u can then do bench clear-cache then bench build. Your site will definitely be up.

i have done code level customization so now what to do

administrator@Server:~/erpnext$ bench update --reset
INFO:bench.utils:updating bench
INFO:bench.utils:git pull
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 “/opt/bench/bench-repo/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 “/opt/bench/bench-repo/bench/commands/update.py”, line 36, in update
update_bench()
File “/opt/bench/bench-repo/bench/utils.py”, line 261, in update_bench
exec_cmd(“git pull”, cwd=cwd)
File “/opt/bench/bench-repo/bench/utils.py”, line 159, in exec_cmd
raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull
administrator@Server:~/erpnext$

do i need to reinstall bench??

Hello,

I just noticed you’re on the administrator user of your server. Have you tried switching to the frappe or root users instead?

I just noticed you’re on the administrator user of your server. Have you tried switching to the frappe or root users instead?
for what i have to switch to frappe or root?

for what i need to switch to root or frappe

The frappe user should be enough.

I think you are in the wrong subdir. Login as user frappe

cd ~/frappe-bench
bench update --reset

You will lose your code level customizations​:exclamation: :exclamation: :exclamation:

You were doing the command in the wrong folder. from your frappe user, do this command:
cd /home/frappe/frappe-bench && bench update --reset

but i dont have frappe-bench folder
ihave ~/erpnext/apps/frappe/frappe

If you did the manual install, which folder did you install your bench in? The folder is usually before the apps folder:

e.g. /home/frappe /frappe-bench /apps/frappe
go in the folder before apps and run bench update --reset

so in your case, run it from the “erpnext” folder you typed above.

bench.utils.CommandFailedError: git pull

do i need to reinstall bench??

pls help i am stucked