Error "Switching to branch when running "opehanbian-config"

Since a recent update I keep getting the error “FAILED” when the script tries to change to what I assume is the current branch. I’ve tried to find the error, but keep failing. Any hints of where to look would be greatly appreciated. I’m guessing that it might be that my openhabian.conf is missing a line containg information about the current version

2020-06-21_16:50:52_PDT [openHABian] Checking for root privileges… OK
2020-06-21_16:50:52_PDT [openHABian] Loading configuration file ‘/etc/openhabian.conf’… OK
2020-06-21_16:50:52_PDT [openHABian] openHABian configuration tool version: [stable]v1.5-644(e01719a)
2020-06-21_16:50:53_PDT [openHABian] Checking for changes in origin branch HEAD … OK
2020-06-21_16:52:42_PDT [openHABian] Switching to branch … fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths

And with debug set to maximum:

  • echo -n '2020-06-21_17:23:34_PDT [openHABian] Switching to branch … ’
    2020-06-21_17:23:34_PDT [openHABian] Switching to branch … + git -C /opt/openhabian checkout --quiet ‘’
    fatal: empty string is not a valid pathspec. please use . instead if you meant to match all paths
  • FAILED=1
  • echo FAILED
  • return 0


Are there branch= and repositoryurl= lines in /etc/openhabian.conf ?


cd /opt/openhabian
git status

git checkout stable
(or master)

There are no branch= or respsitoryurl= lines in openhabian.conf.

I would add them if I had an idea what they should look like.

git claims to be up to date on master with no issues

Thank you so much for responding.


You can add them but that is not your problem. They don’t have to be there for git / openhabian-config to work.


What’s the output of the commands I asked you to execute ?

Sorry, I said it was all OK but didn’t post it, here it is:

[00:34:04] openhabian@openhab:/opt/openhabian$ git status On branch master Your branch is up to date with 'origin/master'.

nothing to commit, working tree clean
[00:34:31] openhabian@openhab:/opt/openhabian$ sudo git checkout master
[sudo] password for openhabian:
Already on ‘master’
Your branch is up to date with ‘origin/master’.

And again, thanks so much for helping.

adding the lines:


got rid of the error message which makes me very happy.

Thanks, Ira

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.