-
-
Notifications
You must be signed in to change notification settings - Fork 85
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
Test suite fails if commit signing is enabled #1317
Comments
I have commit signing enabled, and I can't reproduce this :/
then in another terminal:
Then I Tell git about your signing key This is how the file
Then I run the test suite:
|
Hm, I'm on my phone now, but I do remember I have a specific key ID set up to use for signing too. I use Gnome Keyring for providing the ssh/gpg agents, though I don't use Gnome otherwise. X11 session. I'll take a look later and provide an anonymised git config for you. |
I'm still working on the reproduction, I sent the message to save what I done. Hopefully I can reproduce the issue in docker container 👍 |
I updated my previous message with all the steps to reproduce this in docker. The test suite passes (I added the flag So yeah, please provide instructions on how to reproduce this in docker 🙏 |
It seems the key is to set a password for the gpg key. But do notice I got a completely different error than the one above! # Because this is what I'm familar with (arch and podman)
# I assume you can do this with arch in docker too.
podman run -ti --rm docker.io/library/archlinux /bin/bash
# The rest of the commands is in the container
pacman -Syu --noconfirm base-devel git rustup # If this asks about which alternative to install for dbus, just go with the default.
rustup install stable
gpg --full-generate-key
# Generate key with defaults. Make sure to set a password!
# Note down key ID
# Adjust with key ID from previous step
cat > ~/.gitconfig <<EOF
[user]
name = My name
email = [email protected]
signingKey = AE745A0883D55A2EFEC1118FCBF98F3123A22DE6
[commit]
gpgSign = true
EOF
git clone https://github.com/MarcoIeni/release-plz
cd release-plz
RUST_BACKTRACE=1 cargo test --no-default-features With this I get errors like:
All of these fail in that way:
The exact error message here differs from before I will continue to test with trying to set up gnome keyring in docker (somehow!). I suspect this is related to whatever gpg agent/password entry mechanism you use. Update:
|
Unfortunately there seem to be a bunch of roadblocks to running the gnome-keyring part in a docker container. Such as getting a full systemd/dbus inside the container. Here is a collection of errors I have come across:
This may need a full VM to exactly reproduce. :( HOWEVER: I do believe that my above reproducer when |
Yeah, I see. |
Bug description
While trying to make a PR for release-plz I have had lots of issues running the test suite. Apparently the tests suite doesn't work if you have commit signing enabled in your
~/.gitconfig
:To Reproduce
Steps to reproduce the behavior:
Expected behavior
The test should isolate itself from the system git config. There could be all sorts of settings in there that aren't compatible with what the test suite wants. Possibly many other settings that I don't happen to have.
Screenshots
Environment
Additional context
The test also breaks if tag signing is set up:
The text was updated successfully, but these errors were encountered: