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

Global config flag ignored #86

Open
rasmusson opened this issue Jul 11, 2024 · 7 comments
Open

Global config flag ignored #86

rasmusson opened this issue Jul 11, 2024 · 7 comments
Assignees

Comments

@rasmusson
Copy link

I using hookdeck cli with docker and Im trying to run it as another user than root.
To accomplish that Im trying to use --config flag of hookdeck cli. No matter what I try, the flag seems to be ignored.

I put the config file in /tmp/.config/hookdeck/config.toml
and try to start hookdeck cli with
hookdeck listen homeassistant-service:8080 automate --config /tmp/.config/hookdeck/config.toml

I always get
"Not connected with any account. Creating a guest account..."

@alexluong
Copy link
Collaborator

@rasmusson can you share the config you have just so I understand how you're using it? Please remember to remove the secrets before sharing!

@rasmusson
Copy link
Author

[default]
api_key = "KEY"
client_id = "cli_iL4DiP3O2SAcG4"
device_name = "server"
display_name = "Stefan Rasmusson"
team_id = "tm_nekwmmmU0Nni"
team_mode = "inbound"
team_name = "home_automation"

@alexluong
Copy link
Collaborator

Thanks @rasmusson. Can you also share your Hookdeck CLI version you're running?

Have you tried hookdeck whoami to see which profile you're using?

It seems you may be running the CLI inside Docker? Let me test this out and see what's going on here.

@rasmusson
Copy link
Author

version 0.8.6
Profile is default

@alexluong
Copy link
Collaborator

Hi @rasmusson, thanks for sharing. I tried recreating your issue locally but unable to encounter this problem. I noticed a few things, so maybe you can help explore these ideas maybe?

1: The config you shared seems a little dated. It looks like it's a "CI" client where you ran hookdeck ci to generate this key. Not a problem, but the schema seems like an old version. I would highly encourage you to re-run hookdeck ci or hookdeck login to get a new set of credentials. I think this should solve your issue.

2: Because you used /tmp/... so I assume you're working within a Docker container. Can you try recreating this issue locally first to make sure the issue is not Docker-specific?

3: You're using v0.8.6, which is a bit older version. We've had 2 breaking changes since. This should NOT be an issue here since I tried using this version too and things still work on my end, but maybe you should consider updating to the latest version, just to be up to date?

Again, I think the issue is probably the old credentials here. Sorry for the breaking change, we definitely should have considered a better migration path last year when we rolled out a new version where the CLI handles API keys differently.

Please let me know if you still run into issues here and I'd be happy to investigate further!

@leggetter
Copy link
Collaborator

@alexluong - just to quickly confirm, you have see the --config flag work as expected?

@alexluong
Copy link
Collaborator

@leggetter yes, when I tried the config flag, everything was working as expected. I tested on the latest version and v0.8.6.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants