Bench update error today

I got this error today in my development laptop. I tried to do a bench update

chris@chris:~/frappe/frappe-bench$ bench update
INFO:bench.utils:updating bench
fatal: Couldn't find remote ref refs/heads/new-install
Unexpected end of command stream
Traceback (most recent call last):
  File "/usr/local/bin/bench", line 9, in <module>
    load_entry_point('bench==2.0.0', 'console_scripts', 'bench')()
  File "/usr/local/frappe/bench-repo/bench/", line 40, in cli
  File "/usr/local/lib/python2.7/dist-packages/click/", line 716, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 696, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 1060, in invoke
    return _process_result(sub_ctx.command.invoke(sub_ctx))
  File "/usr/local/lib/python2.7/dist-packages/click/", line 889, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python2.7/dist-packages/click/", line 534, in invoke
    return callback(*args, **kwargs)
  File "/usr/local/frappe/bench-repo/bench/commands/", line 49, in update
  File "/usr/local/frappe/bench-repo/bench/", line 193, in update_bench
    exec_cmd("git pull", cwd=cwd)
  File "/usr/local/frappe/bench-repo/bench/", line 99, in exec_cmd
    raise CommandFailedError(cmd)
bench.utils.CommandFailedError: git pull

Any idea why?

I have solve this problem by changing my repo in bench

[remote "origin"]
        url =
        #fetch = +refs/heads/new-install:refs/remotes/origin/new-install <---- old one
        fetch = +refs/heads/*:refs/remotes/origin/*
[branch "new-install"]
        remote = origin
        #merge = refs/heads/new-install
        merge = refs/heads/master <---- old one

@anand I am using the new installer script for this one. maybe you have the reason removing the new install tag/branch?

I would start by looking in .git/config file for references to that branch, and removing them.
Plus take a look at bench update failed · Issue #5205 · frappe/erpnext · GitHub

@yashodhan yes you are right. I think the problem is the new installer that @anand made the git pointing to new install tag/branch for bench?

Yeah change bench repo’s branch. This was fixed sometime back.

1 Like