Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

phive install does not silently import keys #312

Closed
oliverklee opened this issue Jun 8, 2021 · 3 comments
Closed

phive install does not silently import keys #312

oliverklee opened this issue Jun 8, 2021 · 3 comments

Comments

@oliverklee
Copy link
Contributor

PHIVE does not silently import keys with phive install (at least not in this case), which breaks phive install in non-interactive environments like CI builds.

Steps to reproduce

rm -rf ~/.phive/
git clone git@github.com:sabberworm/PHP-CSS-Parser.git
cd PHP-CSS-Parser
phive install --trust-gpg-keys A972B9ABB95D0B760B51442231C7E470E2138192,A972B9ABB95D0B760B51442231C7E470E2138192

Expected results

At least the GPG keys A972B9ABB95D0B760B51442231C7E470E2138192 and A972B9ABB95D0B760B51442231C7E470E2138192 are silently retrieved and trusted.

Actual results

PHIVE still asks whether the second key should be imported:

Phive 0.14.5 - Copyright (C) 2015-2021 by Arne Blankerts, Sebastian Heuer and Contributors
Downloading https://squizlabs.github.io/PHP_CodeSniffer/phars/phpcbf-3.6.0.phar
Downloading https://squizlabs.github.io/PHP_CodeSniffer/phars/phpcbf-3.6.0.phar.asc
Downloading key 31C7E470E2138192
Trying to connect to keys.openpgp.org (37.218.245.50)
Downloading https://keys.openpgp.org/pks/lookup?op=get&options=mr&search=0x31C7E470E2138192
Successfully downloaded key.

        Fingerprint: A972 B9AB B95D 0B76 0B51 4422 31C7 E470 E213 8192

        Greg Sherwood <gsherwood@squiz.net>

        Created: 2017-11-29

Import this key? [y|N]
@theseer
Copy link
Member

theseer commented Jun 8, 2021

I'm not convinced that is a bug.

The signature is made by a key with the ID 31C7E470E2138192, which by itself is not within the list of IDs to trust. What you pass in there in the example showcasing the problem are fingerprints. Which is not the same.

@theseer
Copy link
Member

theseer commented Jun 9, 2021

Wie might actually consider implementing that as a new feature: Apart from the key ID we could also check the Fingerprint....

@oliverklee
Copy link
Contributor Author

@theseer Thanks! ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants