Git Product home page Git Product logo

Comments (3)

marcofranssen avatar marcofranssen commented on May 24, 2024 2

I finally figured it out. I was using the subkey id as opposed to the subkey fingerprint. Now I'm using the subkey fingerprint all works perfect.

I figured it out when reading this code.

export const getKeygrip = async (fingerprint: string): Promise<string> => {
return await exec
.getExecOutput('gpg', ['--batch', '--with-colons', '--with-keygrip', '--list-secret-keys', fingerprint], {
ignoreReturnCode: true,
silent: true
})
.then(res => {
return parseKeygripFromGpgColonsOutput(res.stdout, fingerprint);
});
};

Probably would be good to document how to get the fingerprint of a given subkey id.

I did this via following command.

gpg --batch --with-colons --with-keygrip --list-secret-keys | awk -F: "/^fpr:.*AE0B37D819AFABE6:/ { print $10 }"

The keyid AE0B37D819AFABE6 I must be replaced with your own subkey ID ofcourse. Not sure if there is an easier way of getting this.

from ghaction-import-gpg.

marcofranssen avatar marcofranssen commented on May 24, 2024

Looking at the log and the related code it seems it fails retrieving the keygrip.

https://github.com/crazy-max/ghaction-import-gpg/blob/master/src/main.ts#L77

In the logs you will see there is no keygrip printed, meaning https://github.com/crazy-max/ghaction-import-gpg/blob/master/src/main.ts#L76 probably failed getting the keygrip.

from ghaction-import-gpg.

bertramn avatar bertramn commented on May 24, 2024

I am running into the same issue but adding the full fingerprint still does not make it work. You can get the fingerprint of subkeys like that:

gpg -K --with-subkey-fingerprint <[email protected]>

from ghaction-import-gpg.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.