start-os: [bug]: [cli]: Cannot sideload using embassy-cli remotely

EmbassyOS Version

cb5bb34ed82e7991d24f7cb5ad0ae37146b40c10

Device

Laptop/Desktop

Device OS

MacOS

Device OS Version

11.6.4

Current Behavior

CLI is hard/impossible to use remotely on Mac. Haven’t tested on Linux.

  1. Install embassy-cli at the above hash
  2. create /etc/embassy/config.yaml and put the following in it: host: "https://embassy-30297ba3.local" (doesn’t work without quotes)
  3. sudo chown -R $(whoami) /etc/embassy
  4. Trust root cert in system keychain
  5. embassy-cli auth login and paste password
  6. Bug number 1: embassy-cli tries to connect to localhost despite my embassy’s hostname being defined in the config file
% embassy-cli auth login                                  
Password: 
General error: HTTP Error: error sending request for url (http://127.0.0.1/rpc/v1): error trying to connect: tcp connect error: Connection refused (os error 61)

  1. embassy-cli -h https://embassy-30297ba3.local/ auth login
  2. That seems to work
  3. Bug number 2:
% embassy-cli -h https://embassy-30297ba3.local package install electrs.s9pk 
S9PK Parsing Error: Deserializing Manifest (CBOR): Semantic(None, "missing field `description`")

I can install this exact s9pk just fine by scping it to my box and sideloading.

Expected Behavior

  1. embassy-cli should honor the hostname set in the config so I don’t have to use the -h flag
  2. embassy-cli install should install an s9pk that otherwise works.

About this issue

  • Original URL
  • State: closed
  • Created 2 years ago
  • Comments: 18 (18 by maintainers)

Most upvoted comments

And to be clear, the home folder overrides root, not the other way around

Ok hold up. I just realized I have another version of config.yaml in ~/.embassy/config.yaml. In this version, I had no hostname defined, so I added my box’s hostname to this file and boom!.. it works.

Question: how does the yaml file in the user’s home folder interact with the one in /etc/embassy? Seems the user’s home folder overrides the one in /etc. Is this for all fields or just for fields that don’t exist in the user’s home folder?

/etc/embassy was the OG location from when 030 was still in development. I think since 031 @dr-bonez has enabled the config path to be local, ie. ~/.embassy. This is where the embassy-publish script, and the SDK developer key live, and is now where the config.yaml file can live, so I would default to using this local directory.

fwiw you can also add the embassy IP address as the value for the host field, and you dont need to do anything with certs.

Another question: is it possible to define multiple embassies in this config file?

Yes, agreed, I wrote that in the OP.

Perhaps I should test on Linux, it’s likely related to this being a Mac