Keep getting the 'ERROR: Couldn't read app data Flyway permit' error when trying to authenticate
HVo
Posts: 6 New member
I keep getting this error when trying to authenticate Flyway in my WSL2 environment. This error popped up after I pasted the permit code and hit 'Enter'. My organization has Team edition license and have assigned it to my Red Gate account. Any idea how to resolve this?
Tagged:
Answers
Have a look on this page for the suggested licensing methods: https://documentation.red-gate.com/fd/flyway-licensing-263061944.html
I think that the "Online non-interactive flow" and an email/PAT token is what you want on WSL.
Flyway will need to be able to read and write to the folder "~/.config/Redgate/Flyway CLI" (see https://documentation.red-gate.com/fd/auth-224919651.html)
I already tried to email/PAT token method; didn't work either. It as if flyway completely ignores the email/token settings in the .toml file.
flyway.licenseKey settings in the legacy .conf file is only method that works, but it stopped working when our organization's license was renewed at the beginning of the month. Now, the FL01- style license key doesn't exist anymore.
I've just tested this on v10.20.0 (that is not latest but it was to hand) and it does work for me as described in the docs.
In my conf/flyway.toml file I have this:
[flyway]
email = "<redacted>"
and when I run Flyway it picks up my key to license the product, if i use the -X flag to get extended debug I can also see the configuration being picked up:
...
flyway.detectEncoding -> false
...
...
Is it possible that your TOML configuration file isn't being picked up ? You would see something like this in the extended debug output if Flyway found it
...
DEBUG: Loading config file: <your path to flyway>/conf/flyway.toml
...
DEBUG: Failed to fetch permit from PAT token licensing: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
I double-check to make sure I have valid license assigned to my email and the PAT token has entered correctly.