cirruslabs / tart

macOS and Linux VMs on Apple Silicon to use in CI and other automations
https://tart.run
Other
3.67k stars 103 forks source link

Unable to clone/pull VM requires login over SSH due to Keychain #689

Closed hepivax closed 7 months ago

hepivax commented 7 months ago

I'm trying to clone/pull image hosted on a private DockerHub repository (requires tart login) It works fine when I execute it from terminal but I fails over SSH:

tart clone registry-1.docker.io/my-repo/my-vm my-vm
pulling manifest...
Error: Failed(message: "Keychain returned unsuccessful status -25308")

When I try to tart login from SSH session:

tart login registry-1.docker.io
User:
Password:
Error: Failed(message: "Keychain failed to update item: User interaction is not allowed.")

I tried to change the Tart Credentials Access Control settings to Allow all applications to access this item but it didn't solve the issue.

edigaryev commented 7 months ago

What's the output of tart --version?

Also, can you try running tart clone over SSH while still being logged-in via GUI/ScreenSharing/etc.?

hepivax commented 7 months ago

I was on 2.3.0 and upgraded to 2.4.2 it reproduced on both. the ssh session is done using iTerm2 to localhost, so I'm logged in of course.

edigaryev commented 7 months ago

It seems that you need to unlock the Keychain first when working via SSH:

security unlock-keychain

Note that it also supports the -p command-line argument that allows you to supply the password and unlock non-interactively.

I think this could be documented in the FAQ, so not closing the issue for now.