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

Commit signing should check if it's enabled before globally enabling #17

Closed
wolph opened this issue Mar 11, 2018 · 2 comments
Closed

Commit signing should check if it's enabled before globally enabling #17

wolph opened this issue Mar 11, 2018 · 2 comments

Comments

@wolph
Copy link

wolph commented Mar 11, 2018

The git commit signing is always enabled globally by the script currently which doesn't detect a locally included gitconfig file. For some of my machines (which I consider safe) I have my gpgkeys available.

Often I'll be working on machines for several customers but will use my own shell config (which includes my gitconfig) which results in errors because the gpgkey obviously doesn't exist on those machines

The specific codeblock:
https://github.com/NicoHood/gpgit/blob/14c0ffb7f065c12bfcfa894aa0220a2cde9fa05b/gpgit.sh#L424-L432

I suggest changing it to:

if [[ "$(git config commit.gpgsign || true)" != "true" ]]; then
@NicoHood
Copy link
Owner

Oh, my bad. I think this was a copy+paste mistake. Good catch!

Does the rest of the script look good to you? Did you check it? I have not tagged the next update yet.

@wolph
Copy link
Author

wolph commented Mar 12, 2018

Yep, I've created several releases with it and so far I haven't seen any issues :)

Looks good to me

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