This is for a custom app that we created which doesn’t have upstream remote defined.
Is upstream necessary for bench update to work? Any other work around possible?
When I do bench update, I get this error -
(env)root@ahplsvr01:/home/frappe/frappe-bench/apps/quality# bench update
Already up-to-date.
fatal: ‘upstream’ does not appear to be a git repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
Error: None
Traceback (most recent call last):
File “/usr/local/bin/bench”, line 9, in
load_entry_point(‘bench==0.92’, ‘console_scripts’, ‘bench’)()
File “/home/frappe/bench-repo/bench/cli.py”, line 56, in cli
bench()
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 664, in call
return self.main(*args, **kwargs)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 644, in main
rv = self.invoke(ctx)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 991, in invoke
return processresult(sub_ctx.command.invoke(sub_ctx))
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 837, in invoke
return ctx.invoke(self.callback, **ctx.params)
File “/usr/local/lib/python2.7/dist-packages/click/core.py”, line 464, in invoke
return callback(*args, **kwargs)
File “/home/frappe/bench-repo/bench/cli.py”, line 236, in update
pull_all_apps()
File “/home/frappe/bench-repo/bench/app.py”, line 91, in pull_all_apps
exec_cmd(“git pull {rebase} upstream {branch}”.format(rebase=rebase, branch=get_current_branch(app_dir)), cwd=app_dir)
File “/home/frappe/bench-repo/bench/utils.py”, line 80, 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 upstream master’ returned non-zero exit status 1
error git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
$ git pull upstream master
From https://github.com/thispl/teampro
* branch master -> FETCH_HEAD
Already up to date.
$ find . -name "*.pyc" -delete
$ git pull origin master
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
ERROR:
Traceback (most recent call last):
File "/usr/local/bin/bench", line 8, in <module>
sys.exit(cli())
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/cli.py", line 127, in cli
bench_command()
File "/usr/lib/python3/dist-packages/click/core.py", line 764, in __call__
return self.main(*args, **kwargs)
File "/usr/lib/python3/dist-packages/click/core.py", line 717, in main
rv = self.invoke(ctx)
File "/usr/lib/python3/dist-packages/click/core.py", line 1137, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "/usr/lib/python3/dist-packages/click/core.py", line 956, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "/usr/lib/python3/dist-packages/click/core.py", line 555, in invoke
return callback(*args, **kwargs)
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/commands/update.py", line 59, in update
update(
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/utils/bench.py", line 421, in update
pull_apps(apps=apps, bench_path=bench_path, reset=reset)
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/app.py", line 664, in pull_apps
bench.run(f"git pull {rebase} {remote} {branch}", cwd=app_dir)
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/bench.py", line 48, in run
return exec_cmd(cmd, cwd=cwd or self.cwd)
File "/home/sagar_p/.local/lib/python3.10/site-packages/bench/utils/__init__.py", line 155, in exec_cmd
raise CommandFailedError
bench.exceptions.CommandFailedError