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

"make test" is failing for gnupg2>=2.1.0 #46

Closed
antmak opened this issue Aug 31, 2016 · 5 comments
Closed

"make test" is failing for gnupg2>=2.1.0 #46

antmak opened this issue Aug 31, 2016 · 5 comments

Comments

@antmak
Copy link
Contributor

antmak commented Aug 31, 2016

I run "make test" and see error message "line 96: _get_gpg_fingerprint_by_email: command not found" . It prompts for passphrase on gpg key "user1@gitsecret.io" "user2@gitsecret.io"

Should I create gpg keys for user1 and user2? Could you mark about this in CONTRIBUTING.md ?

@sobolevn
Copy link
Owner

What are your os and shell?

It should not be like this. You can have a look at travis.yml.

@antmak
Copy link
Contributor Author

antmak commented Aug 31, 2016

{Fedora 24, Fedora 21} x86_64. bash, version 4.3.42(1)-release (x86_64-redhat-linux-gnu). gpg2.

@sobolevn
Copy link
Owner

Ok, I will have a look at it soon.

@antmak
Copy link
Contributor Author

antmak commented Aug 31, 2016

Thx. I'll try also

@sobolevn
Copy link
Owner

sobolevn commented Oct 1, 2016

@antmak sorry it took me so long to fix this issue.

My env: https://github.com/sobolevn/git-secret/blob/master/.docker/rpm/fedora/Dockerfile

I did a lot of research for this case. Here's what I came up with: only install_fixture_full_key is affected (so, only tests), because there's a breaking change in the gnupg2 since versions 2.1.x. Everything works just fine with the versions 2.0.x: https://travis-ci.org/sobolevn/git-secret/jobs/164323199#L253

What kind of changes there are? Some kind of --export-secret-key magic.

This command works in the shell:

[root@bc3d887d95d3 git-secret]# gpg2 --homedir="tests/fixtures/gpg/user1" --no-permission-warning --output "private_key.key" --batch --yes --armor --pinentry-mode=loopback --passphrase="user1pass" --no-tty --export-secret-key "user1@gitsecret.io"

The same command fails when running tests:

(in test file /code/git-secret/tests/test_changes.bats, line 37)
`[ "$status" -eq 0 ]' failed
gpg: /code/git-secret/temp/trustdb.gpg: trustdb created
gpg: key D2805A4182E99FF4: public key "user1 user1@gitsecret.io" imported
gpg: key D2805A4182E99FF4/D2805A4182E99FF4: error sending to agent: No such file or directory
gpg: error building skey array: No such file or directory
gpg: Total number processed: 3
gpg: imported: 1
gpg: secret keys read: 3
gpg: DBG: FIXME: merging secret key blocks is not anymore available
gpg: DBG: FIXME: No way to print secret key packets here
gpg: key D2805A4182E99FF4: "user1 user1@gitsecret.io" not changed
gpg: Total number processed: 1
gpg: unchanged: 1

I have found several issues on the internet with the same problems:

  1. Inappropriate ioctl for device keybase/keybase-issues#1712
  2. https://bugzilla.redhat.com/show_bug.cgi?id=841588

For now - I don't know how to fix this. I guess I have to gpg developers for help.

@sobolevn sobolevn changed the title "make test" "make test" is failing for gnupg2 >= 2.1.0 Oct 1, 2016
@sobolevn sobolevn changed the title "make test" is failing for gnupg2 >= 2.1.0 "make test" is failing for gnupg2>=2.1.0 Oct 1, 2016
sobolevn added a commit that referenced this issue Oct 3, 2016
Changes:
1. Fixed typo in tests_base
2. Fixed `--no-index` issue
3. Refactored `add` test to be more strict

Closes #50
Refernces #46
@sobolevn sobolevn added this to the 0.2.2 milestone Oct 3, 2016
@sobolevn sobolevn removed this from the 0.2.2 milestone Feb 18, 2017
sobolevn added a commit that referenced this issue Feb 26, 2017
Changes:
1. Fixed typo in tests_base
2. Fixed `--no-index` issue
3. Refactored `add` test to be more strict

Closes #50
Refernces #46
@sobolevn sobolevn added this to the 0.3.0 milestone Jul 17, 2017
@hurricanehrndz hurricanehrndz mentioned this issue Sep 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants