Closed semeral closed 2 years ago
That makes it look like there's an issue with how the password or API key are entered in the config file. Can you confirm it matches the example in the README?
I browsed through other opened and closed issues and tried removing "f"
in 'Authorization': f'Bearer {API_KEY}'
, as was suggested in #41. Then I was getting this error when I set api_key
in deploy_config
:
Error importing certificate!
401: Unauthorized
When I tried authorizing with password, it worked, but I can't get it working with API key, I'm still getting this error. But that is, I guess, another issue.
I tried tweaking both config_deploy
and deploy_freenas.py
and I think that it’s maybe parsing password and api_key incorrectly. It throws 401 error if there is any other value set in config_deploy
, e.g. cert_fqdn
. When I add print(API_KEY)
to deploy_freenas.py
, it prints the api_key value and any other value that I uncommented in the deploy_config
. Only when the password is left uncommented, it succesfully deploys certs, it still fails with 401 with api_key.
I'm running TrueNAS-12.0-U8.1, I haven't touched neither
acme.sh
nordeploy_freenas.py
scripts, and I'm constantly getting an error:Unfortunately I have no experience with python and I would appreciate any input, as I don't have the slightest clue where to even look for issues.