pdobsan / oama

OAuth credential Manager
Other
138 stars 10 forks source link

key "services_file" not found #19

Closed Strykar closed 2 years ago

Strykar commented 2 years ago

Authorization fails with:

$ mailctl -c ~/.config/mailctl/config.yaml --debug authorize google snipped.email@gmail.com
mailctl: Aeson exception:
Error in $: parsing MailCtl.Environment.Configuration(Configuration) failed, key "services_file" not found
CallStack (from HasCallStack):
  error, called at lib/MailCtl/Environment.hs:165:23 in mailctl-0.7.4-ff681da555a2803c4a4890fc84e92bdcf7e0808c80f51bdad52a4173c2c12c04:MailCtl.Environment

Service and Config yaml's exist and are correctly configured:

$ ls ~/.config/mailctl
   inode Permissions Size User    Group   Date Modified Name
20187068 .rw-r--r--   453 strykar strykar  2 Dec 04:18   config.yaml
20187060 .rw-r--r--  1.1k strykar strykar  2 Dec 05:00   services.yaml

$ cat ~/.config/mailctl/config.yaml 
google:
  auth_endpoint: https://accounts.google.com/o/oauth2/auth
  auth_http_method: POST
  auth_params_mode: query-string
  token_endpoint: https://accounts.google.com/o/oauth2/token
  token_http_method: POST
  token_params_mode: both
  redirect_uri: http://localhost:8080
  auth_scope: https://mail.google.com/
  client_id: snipped.apps.googleusercontent.com
  client_secret: snipped_secret

$ cat ~/.config/mailctl/services.yaml 
services_file: /home/strykar/.config/mailctl/services.yaml
oauth2_dir: /home/strykar/.local/var/mailctl
encrypt_cmd:
  exec: gpg
  args:
    - --encrypt
    - --recipient
    - snipped_GPG_ID
    - -o
decrypt_cmd:
  exec: gpg
  args:
    - --decrypt
Strykar commented 2 years ago

This was due to typos on the wiki, which had the names inverted. Wiki is updated too, closing.