Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot upgrade mailcow, got errors when ./update.sh --check #4271

Closed
Widmo opened this issue Sep 14, 2021 · 2 comments
Closed

Cannot upgrade mailcow, got errors when ./update.sh --check #4271

Widmo opened this issue Sep 14, 2021 · 2 comments
Labels
stale Please update the issue with current status, unclear if it's still open/needed.

Comments

@Widmo
Copy link

Widmo commented Sep 14, 2021

Hi,

I installed mailcow in May, now I tried to update it.

./update.sh --check
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Checking remote code for updates...
A problem occurred while trying to fetch the latest revision from github.

Just update.sh

./update.sh
fatal: ambiguous argument 'HEAD': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'
Checking internet connection... OK
Checking for newer update script...
fatal: 'origin' 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: pathspec 'origin/HEAD' did not match any file(s) known to git
error: pathspec 'update.sh' did not match any file(s) known to git
Are you sure you want to update mailcow: dockerized? All containers will be stopped. [y/N]

Once confirmed, the containers stop.

Debian 10, no apparmor, VMware then docker, 4 core, 6 GB, docker 20.10.8, composer 1.29.2, no modification except official.

git diff origin/master
fatal: ambiguous argument 'origin/master': unknown revision or path not in the working tree.
Use '--' to separate paths from revisions, like this:
'git <command> [<revision>...] -- [<file>...]'

No dns problems.

@milkmaker
Copy link
Collaborator

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.

@milkmaker milkmaker added the stale Please update the issue with current status, unclear if it's still open/needed. label Nov 14, 2021
@superstes
Copy link

superstes commented Aug 14, 2024

Have seen this too. Hope this information helps someone:

I've had to revert an update before - maybe this broke it. (done as seen in the docs)

Checking remote code for updates...
A problem occurred while trying to fetch the latest revision from github.

This is how it looks:

# command used by the script
root@m02:/var/lib/mailcow# git rev-parse --abbrev-ref HEAD
HEAD

# current release
root@m02:/var/lib/mailcow# git describe --tags --abbrev=0
2024-05

# latest release
root@m02:/var/lib/mailcow# git describe --tags $(git rev-list --tags --max-count=1)
2024-07

This seems to be because the roll-back causes a detached HEAD in git:
https://circleci.com/blog/git-detached-head-state/
https://stackoverflow.com/questions/10228760/how-do-i-fix-a-git-detached-head

You can switch back to master via: git checkout master

Then it should look like this:

root@m02:/var/lib/mailcow# git rev-parse --abbrev-ref HEAD
master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Please update the issue with current status, unclear if it's still open/needed.
Projects
None yet
Development

No branches or pull requests

3 participants