Skip to content

curl need add -L param to install.sh when get gpg key #11138

Closed

Activity

  1. JamesParrott commented on Nov 8, 2025

    @JamesParrott

    Thanks Vanni! I wondered why the official installation instructions didn't work. Adding -L helped me get the GPG key on Debian:

    sudo sh -c 'curl -L https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg'
    
  2. Vanni-Fan commented on Nov 10, 2025

    @Vanni-Fan
    Author

    Thanks Vanni! I wondered why the official installation instructions didn't work. Adding -L helped me get the GPG key on Debian:

    sudo sh -c 'curl -L https://packages.fluentbit.io/fluentbit.key | gpg --dearmor > /usr/share/keyrings/fluentbit-keyring.gpg'
    

    The default behavior of curl does not follow 30x. ( but -L param will by follow 30x)
    When https://packages.fluentbit.io/fluentbit.key location to https://s3.amazonaws.com/packages.fluentbit.io/fluentbit.key,
    curl will obtain an empty content to gpg command.

    like this: echo '' | gpg --dearmor, You will receive an error: "no valid OpenPGP data found."

    [root@dev vanni]# echo '' | gpg --dearmor
    gpg: no valid OpenPGP data found.
    
  3. patrick-stephens commented on Nov 10, 2025

    @patrick-stephens
    Contributor

    Resolved by #11137

  4. rafaelma commented on Nov 10, 2025

    @rafaelma

    This can be a security issue.

    Not using -L guarantees that the gpg key has to be found in the address defined in the client repo.
    Accepting a redirect when getting the repo gpg key does not guarantee that the client is talking with the correct/official repo.

    Another important issue with redirects in repo addresses is that they break all system using a proxy to allow the access to the repo from internal infrastructures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions