Getting “Release: The following signatures were invalid” on local repo












1














We just installed an Ubuntu 18.04 Server VM to see if our Chef configuration would work on this new distro.



On a separate VM, we have a local apt mirror for this release:



# tree
.
├── extra
│   ├── binary-amd64
│   │   ├── Packages
│   │   └── Packages.gz
│   └── binary-i386
│   ├── Packages
│   └── Packages.gz
├── Release
└── Release.gpg

3 directories, 6 files


We signed the Release file using this command:



/usr/bin/gpg -abs -o Release.gpg Release


The signature seems to be ok after this:



# LANG=C gpg --verify /var/www/html/ubuntu-local/dists/bionic/Release.gpg /var/www/html/ubuntu-local/dists/bionic/Release
gpg: Signature made mar 29 may 2018 13:03:12 WEST using RSA key ID 271AFAF4
gpg: Good signature from "... <...@...>"


On the client side, we've imported the 271AFAF4 key:



# LANG=C apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2014-10-27 [SC]
0F11 1A77 EE05 C406 2691 FC74 1794 5F7F 271A FAF4
uid [ unknown] ... <...@...>


The repo definition file on the client side is:



deb      "http://localrepo/ubuntu-local" bionic extra


However, each time I run apt-get update I get:



W: GPG error: http://localrepo/ubuntu-local bionic Release: The following signatures were invalid: 0F111A77EE05C4062691FC7417945F7F271AFAF4
E: The repository 'http://localrepo/ubuntu-local bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


However, as you can see above the signature is correct. As a side note, the very same configuration worked on xenial (replacing bionic by xenial in the repo config file), and I also tried to add the xenial repo on the bionic VM with the same result.



I have seen other answers but this seems not to be a duplicate of them.



What am I missing?










share|improve this question
























  • You might find this useful.
    – Elder Geek
    May 29 at 22:21










  • @ElderGeek these are basically the steps that I've followed, it's still failing though.
    – nKn
    May 31 at 7:58










  • basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
    – Elder Geek
    Jun 2 at 21:43
















1














We just installed an Ubuntu 18.04 Server VM to see if our Chef configuration would work on this new distro.



On a separate VM, we have a local apt mirror for this release:



# tree
.
├── extra
│   ├── binary-amd64
│   │   ├── Packages
│   │   └── Packages.gz
│   └── binary-i386
│   ├── Packages
│   └── Packages.gz
├── Release
└── Release.gpg

3 directories, 6 files


We signed the Release file using this command:



/usr/bin/gpg -abs -o Release.gpg Release


The signature seems to be ok after this:



# LANG=C gpg --verify /var/www/html/ubuntu-local/dists/bionic/Release.gpg /var/www/html/ubuntu-local/dists/bionic/Release
gpg: Signature made mar 29 may 2018 13:03:12 WEST using RSA key ID 271AFAF4
gpg: Good signature from "... <...@...>"


On the client side, we've imported the 271AFAF4 key:



# LANG=C apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2014-10-27 [SC]
0F11 1A77 EE05 C406 2691 FC74 1794 5F7F 271A FAF4
uid [ unknown] ... <...@...>


The repo definition file on the client side is:



deb      "http://localrepo/ubuntu-local" bionic extra


However, each time I run apt-get update I get:



W: GPG error: http://localrepo/ubuntu-local bionic Release: The following signatures were invalid: 0F111A77EE05C4062691FC7417945F7F271AFAF4
E: The repository 'http://localrepo/ubuntu-local bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


However, as you can see above the signature is correct. As a side note, the very same configuration worked on xenial (replacing bionic by xenial in the repo config file), and I also tried to add the xenial repo on the bionic VM with the same result.



I have seen other answers but this seems not to be a duplicate of them.



What am I missing?










share|improve this question
























  • You might find this useful.
    – Elder Geek
    May 29 at 22:21










  • @ElderGeek these are basically the steps that I've followed, it's still failing though.
    – nKn
    May 31 at 7:58










  • basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
    – Elder Geek
    Jun 2 at 21:43














1












1








1







We just installed an Ubuntu 18.04 Server VM to see if our Chef configuration would work on this new distro.



On a separate VM, we have a local apt mirror for this release:



# tree
.
├── extra
│   ├── binary-amd64
│   │   ├── Packages
│   │   └── Packages.gz
│   └── binary-i386
│   ├── Packages
│   └── Packages.gz
├── Release
└── Release.gpg

3 directories, 6 files


We signed the Release file using this command:



/usr/bin/gpg -abs -o Release.gpg Release


The signature seems to be ok after this:



# LANG=C gpg --verify /var/www/html/ubuntu-local/dists/bionic/Release.gpg /var/www/html/ubuntu-local/dists/bionic/Release
gpg: Signature made mar 29 may 2018 13:03:12 WEST using RSA key ID 271AFAF4
gpg: Good signature from "... <...@...>"


On the client side, we've imported the 271AFAF4 key:



# LANG=C apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2014-10-27 [SC]
0F11 1A77 EE05 C406 2691 FC74 1794 5F7F 271A FAF4
uid [ unknown] ... <...@...>


The repo definition file on the client side is:



deb      "http://localrepo/ubuntu-local" bionic extra


However, each time I run apt-get update I get:



W: GPG error: http://localrepo/ubuntu-local bionic Release: The following signatures were invalid: 0F111A77EE05C4062691FC7417945F7F271AFAF4
E: The repository 'http://localrepo/ubuntu-local bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


However, as you can see above the signature is correct. As a side note, the very same configuration worked on xenial (replacing bionic by xenial in the repo config file), and I also tried to add the xenial repo on the bionic VM with the same result.



I have seen other answers but this seems not to be a duplicate of them.



What am I missing?










share|improve this question















We just installed an Ubuntu 18.04 Server VM to see if our Chef configuration would work on this new distro.



On a separate VM, we have a local apt mirror for this release:



# tree
.
├── extra
│   ├── binary-amd64
│   │   ├── Packages
│   │   └── Packages.gz
│   └── binary-i386
│   ├── Packages
│   └── Packages.gz
├── Release
└── Release.gpg

3 directories, 6 files


We signed the Release file using this command:



/usr/bin/gpg -abs -o Release.gpg Release


The signature seems to be ok after this:



# LANG=C gpg --verify /var/www/html/ubuntu-local/dists/bionic/Release.gpg /var/www/html/ubuntu-local/dists/bionic/Release
gpg: Signature made mar 29 may 2018 13:03:12 WEST using RSA key ID 271AFAF4
gpg: Good signature from "... <...@...>"


On the client side, we've imported the 271AFAF4 key:



# LANG=C apt-key list
/etc/apt/trusted.gpg
--------------------
pub rsa2048 2014-10-27 [SC]
0F11 1A77 EE05 C406 2691 FC74 1794 5F7F 271A FAF4
uid [ unknown] ... <...@...>


The repo definition file on the client side is:



deb      "http://localrepo/ubuntu-local" bionic extra


However, each time I run apt-get update I get:



W: GPG error: http://localrepo/ubuntu-local bionic Release: The following signatures were invalid: 0F111A77EE05C4062691FC7417945F7F271AFAF4
E: The repository 'http://localrepo/ubuntu-local bionic Release' is not signed.
N: Updating from such a repository can't be done securely, and is therefore disabled by default.
N: See apt-secure(8) manpage for repository creation and user configuration details.


However, as you can see above the signature is correct. As a side note, the very same configuration worked on xenial (replacing bionic by xenial in the repo config file), and I also tried to add the xenial repo on the bionic VM with the same result.



I have seen other answers but this seems not to be a duplicate of them.



What am I missing?







apt server 18.04






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited May 29 at 13:50

























asked May 29 at 13:25









nKn

1163




1163












  • You might find this useful.
    – Elder Geek
    May 29 at 22:21










  • @ElderGeek these are basically the steps that I've followed, it's still failing though.
    – nKn
    May 31 at 7:58










  • basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
    – Elder Geek
    Jun 2 at 21:43


















  • You might find this useful.
    – Elder Geek
    May 29 at 22:21










  • @ElderGeek these are basically the steps that I've followed, it's still failing though.
    – nKn
    May 31 at 7:58










  • basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
    – Elder Geek
    Jun 2 at 21:43
















You might find this useful.
– Elder Geek
May 29 at 22:21




You might find this useful.
– Elder Geek
May 29 at 22:21












@ElderGeek these are basically the steps that I've followed, it's still failing though.
– nKn
May 31 at 7:58




@ElderGeek these are basically the steps that I've followed, it's still failing though.
– nKn
May 31 at 7:58












basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
– Elder Geek
Jun 2 at 21:43




basically? or exactly? Your output indicates that the signature is invalid. Everything else happens due to that. I would begin by generating a new one .
– Elder Geek
Jun 2 at 21:43










1 Answer
1






active

oldest

votes


















0














Try using this -



/usr/bin/gpg -bs -o Release.gpg Release


Instead of this -



/usr/bin/gpg -abs -o Release.gpg Release


Notice the "-a" difference.



From gpg manpage -




-a --armor

Create ASCII armored output. The default is to create the binary OpenPGP format.




According to this -




...The reason why we avoid ASCII-armored files is that they cannot be used directly by SecureApt..






NOTE:



If the above method doesn't work, as an additional step along with the above mentioned method, try adding these two lines to the ~/.gnupg/gpg.conf file -



cert-digest-algo SHA256
digest-algo SHA256





share|improve this answer





















    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "89"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1041584%2fgetting-release-the-following-signatures-were-invalid-on-local-repo%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    Try using this -



    /usr/bin/gpg -bs -o Release.gpg Release


    Instead of this -



    /usr/bin/gpg -abs -o Release.gpg Release


    Notice the "-a" difference.



    From gpg manpage -




    -a --armor

    Create ASCII armored output. The default is to create the binary OpenPGP format.




    According to this -




    ...The reason why we avoid ASCII-armored files is that they cannot be used directly by SecureApt..






    NOTE:



    If the above method doesn't work, as an additional step along with the above mentioned method, try adding these two lines to the ~/.gnupg/gpg.conf file -



    cert-digest-algo SHA256
    digest-algo SHA256





    share|improve this answer


























      0














      Try using this -



      /usr/bin/gpg -bs -o Release.gpg Release


      Instead of this -



      /usr/bin/gpg -abs -o Release.gpg Release


      Notice the "-a" difference.



      From gpg manpage -




      -a --armor

      Create ASCII armored output. The default is to create the binary OpenPGP format.




      According to this -




      ...The reason why we avoid ASCII-armored files is that they cannot be used directly by SecureApt..






      NOTE:



      If the above method doesn't work, as an additional step along with the above mentioned method, try adding these two lines to the ~/.gnupg/gpg.conf file -



      cert-digest-algo SHA256
      digest-algo SHA256





      share|improve this answer
























        0












        0








        0






        Try using this -



        /usr/bin/gpg -bs -o Release.gpg Release


        Instead of this -



        /usr/bin/gpg -abs -o Release.gpg Release


        Notice the "-a" difference.



        From gpg manpage -




        -a --armor

        Create ASCII armored output. The default is to create the binary OpenPGP format.




        According to this -




        ...The reason why we avoid ASCII-armored files is that they cannot be used directly by SecureApt..






        NOTE:



        If the above method doesn't work, as an additional step along with the above mentioned method, try adding these two lines to the ~/.gnupg/gpg.conf file -



        cert-digest-algo SHA256
        digest-algo SHA256





        share|improve this answer












        Try using this -



        /usr/bin/gpg -bs -o Release.gpg Release


        Instead of this -



        /usr/bin/gpg -abs -o Release.gpg Release


        Notice the "-a" difference.



        From gpg manpage -




        -a --armor

        Create ASCII armored output. The default is to create the binary OpenPGP format.




        According to this -




        ...The reason why we avoid ASCII-armored files is that they cannot be used directly by SecureApt..






        NOTE:



        If the above method doesn't work, as an additional step along with the above mentioned method, try adding these two lines to the ~/.gnupg/gpg.conf file -



        cert-digest-algo SHA256
        digest-algo SHA256






        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Dec 10 at 14:49









        Khushal Sancheti

        1




        1






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.





            Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


            Please pay close attention to the following guidance:


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1041584%2fgetting-release-the-following-signatures-were-invalid-on-local-repo%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Ellipse (mathématiques)

            Quarter-circle Tiles

            Mont Emei