Skip to content

Add the ability to specify the secrete key #23

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

Merged
merged 4 commits into from
Jun 1, 2021

Conversation

LeonidVas
Copy link
Collaborator

The PR includes several fixes for signature and adds the ability to specify the gpg secret key for signing by using the env variable.

While adding python3 support
(743b6ce)
signature functionality was broken. The reason - before the
patch, we worked with the subprocess as if the streams (STDIN, STDOUT)
were opened in text mode, but by default they are opened as binary streams.
@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch from 11fd256 to 526a396 Compare May 14, 2021 13:39
@LeonidVas LeonidVas requested a review from Totktonada May 14, 2021 13:52
@LeonidVas LeonidVas self-assigned this May 14, 2021
@LeonidVas LeonidVas linked an issue May 14, 2021 that may be closed by this pull request
@LeonidVas
Copy link
Collaborator Author

The PR adds only the ability to specify which secrete key must be used for signature , because such solution, on the one hand, allows us to set a specific key for signing (which is not necessarily the default) and, on the other hand, allows to reduce the amount of logic added to the tool.

Before the patch to specify the secrete key option "--default-key" was used.
But it's not so clear for 2 reasons:
- If the specified key is absent, the current default key will be used.
- We don't want to change the default secrete key, we want to sign
  some data by specified key.
Now we are using the "-u" option. As a result: if the specified key
is absent, an error will be returned and the key used by default is
not change now.

Part of #19
@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch from 526a396 to d17c275 Compare May 20, 2021 11:03
@Totktonada
Copy link
Member

All my comments are just thoughts around the code, they are not about real problems. I'll add Konstantin as the final reviewer.

Copy link
Member

@Totktonada Totktonada left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. There are some thoughts around, but nothing critical.

@Totktonada Totktonada requested a review from knazarov May 21, 2021 22:07
@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch 5 times, most recently from 776cc6e to 56a6158 Compare May 28, 2021 17:00
@LeonidVas
Copy link
Collaborator Author

@knazarov can you review the PR?

@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch 3 times, most recently from 704e555 to 4c59dbd Compare June 1, 2021 09:55
Added the ability to specify the gpg secret key for signing by using
the env variable.

Closes #19
@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch from 4c59dbd to 5057928 Compare June 1, 2021 09:57
@LeonidVas LeonidVas force-pushed the lvasiliev/gh-19-use-custom-gpg-key branch from 5057928 to e24defa Compare June 1, 2021 12:03
@knazarov
Copy link
Contributor

knazarov commented Jun 1, 2021

LGTM

@knazarov knazarov merged commit 0000e55 into master Jun 1, 2021
@LeonidVas LeonidVas deleted the lvasiliev/gh-19-use-custom-gpg-key branch June 29, 2021 14:44
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

Successfully merging this pull request may close these issues.

Pass arbitrary GPG key to sign a repository
3 participants