Keep getting the 'ERROR: Couldn't read app data Flyway permit' error when trying to authenticate

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

  • The pasting permit process is problematic, in fact we're in the process of removing it currently.
    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)
  • HVoHVo Posts: 6 New member
    Your 2nd link leads to a 404 page.

    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.


  • Sorry - there were some infrastructure upgrades last night that probably resulted in the 404 but it is back now.
    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]
    token = "<redacted>"
    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
    flyway.email -> <redacted>
    flyway.encoding -> UTF-8
    ...
    flyway.target -> latest
    flyway.token -> ********
    flyway.validateMigrationNaming -> 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
    ...
  • HVoHVo Posts: 6 New member
    It did pick up email and PAT token from the config files. Here's the error from the DEBUG log:

    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
    DEBUG: Unable to check for updates: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
    DEBUG: Scanning for classpath resources at 'classpath:db/callback' ...
    DEBUG: Determining location urls for classpath:db/callback using ClassLoader java.net.URLClassLoader@4bdcaf36 ...
    DEBUG: Unable to resolve location classpath:db/callback.
    Flyway Community Edition 10.20.1 by Redgate

    I double-check to make sure I have valid license assigned to my email and the PAT token has entered correctly.

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file