Can't sync second machine

Hey, I just set up atuin in one machine, all perfect.

Now I’m trying to set it up in a second machine. I installed correctly but I can’t login. I got this error:

Error: Invalid request to the service: 401 Unauthorized - password is not correct.

Location:
    /home/runner/work/atuin/atuin/crates/atuin-client/src/api_client.rs:156:17

I’m using the same password, and for the key, the output of atuin key in the first machine (it’s something like: express spot simple…)

sync v2 is enabled in both machines.

Here the doctor for the first machine:

Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.3.0",
    "sync": {
      "cloud": true,
      "records": true,
      "auto_sync": true,
      "last_sync": "1970-01-01 0:00:00.0 +00:00:00"
    },
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "nu",
    "default": "nu",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "24.04",
    "disks": [
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}

and for the second machine:

Atuin Doctor
Checking for diagnostics


Please include the output below with any bug reports or issues

{
  "atuin": {
    "version": "18.3.0",
    "sync": null,
    "sqlite_version": "3.44.0"
  },
  "shell": {
    "name": "nu",
    "default": "nu",
    "plugins": [
      "atuin"
    ],
    "preexec": "built-in"
  },
  "system": {
    "os": "Ubuntu",
    "arch": "x86_64",
    "version": "20.04",
    "disks": [
      {
        "name": "/dev/nvme0n1p2",
        "filesystem": "ext4"
      },
      {
        "name": "/dev/nvme0n1p1",
        "filesystem": "vfat"
      }
    ]
  }
}

What I’m doing wrong?

Hey. Do not know the answer, but this seems strange. Have you actually ever synced anything from the first machine to the Atuin sync server? It seems to me that you are not syncing at all from the first machine. Does running atuin sync actually do anything on the first machine, for example?

That’s certainly odd. atuin sync gives:

0/0 up/down to record store
Sync complete! 17725 items in history database, force: false

is it ok?

Now, it seems to be a problem with the key. I logged out of the first machine and I can’t login now. I run atuin key and it gives me the same paraphrase that when I was logged in…

Can i delete an existing user been logged out?

Yes. atuin sync seems to be working correctly. You seem to be doing everything right, AFAIK. If you cannot log back in, then it certainly seems that the issue lies there. One could probably try to investigate, but in this case, it should be easiest to create an entirely new account, log in on both machines, sync everything there, and leave the old account be. IIRC, @ellie does some kind of garbage collecting on the Atuin sync server to remove old accounts that do not update its sync status any more after some X time units. Alternatively, you could ask @ellie to remove the account and allow you to recreate the account again (with the same username, if you so desire).

Instructions for account removal:

OK, thanks for everything!