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

Nixos, SOPS, and apitokenfile = Invalid format for Authorization header #37

Open
xxxcrow opened this issue Nov 11, 2023 · 0 comments
Open

Comments

@xxxcrow
Copy link

xxxcrow commented Nov 11, 2023

my systemctl status:

× cfdyndns.service - CloudFlare Dynamic DNS Client
     Loaded: loaded (/etc/systemd/system/cfdyndns.service; enabled; preset: enabled)
     Active: failed (Result: exit-code) since Sat 2023-11-11 08:35:01 UTC; 1min 34s ago
   Duration: 1.137s
TriggeredBy: ● cfdyndns.timer
    Process: 2985448 ExecStart=/nix/store/fgqyp2skdzka08p1d9n8cj5hkqhlg7ag-unit-script-cfdyndns-start/bin/cfdyndns-start (code=exited, status=1/FAILURE)
   Main PID: 2985448 (code=exited, status=1/FAILURE)
         IP: 5.1K in, 1.8K out
        CPU: 139ms

Nov 11 08:35:01 immortal cfdyndns-start[2985451]:  INFO  cfdyndns::ip > 123.123.123.123
Nov 11 08:35:01 immortal cfdyndns-start[2985451]:  INFO  cfdyndns::ip > 1234:ab12:1234:ab12:1234:ab12:1234:ab12
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: Error: HTTP 400 Bad Request
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: 6003: Invalid request headers ({"error_chain": Array [Object {"code": Number(6111), "message": String("Invalid format for Authorization header")}]})
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: success: false
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: result: null
Nov 11 08:35:01 immortal cfdyndns-start[2985451]: messages: []
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Main process exited, code=exited, status=1/FAILURE
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Failed with result 'exit-code'.
Nov 11 08:35:01 immortal systemd[1]: cfdyndns.service: Consumed 139ms CPU time, received 5.0K IP traffic, sent 1.7K IP traffic.

my config:

{ pkgs
, config
, ...
}: {
  sops.secrets."cloudflare/cfdyndns" = { };
  services.cfdyndns = {
    enable = true;
    records = [ "domain.one" "domain.two" ];
    apiTokenFile = config.sops.secrets."cloudflare/cfdyndns".path;
  };
}
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

1 participant