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

Allow unsigned commits of base images #90

Open
yeraydavidrodriguez opened this issue Feb 22, 2022 · 0 comments
Open

Allow unsigned commits of base images #90

yeraydavidrodriguez opened this issue Feb 22, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@yeraydavidrodriguez
Copy link
Collaborator

When executing the librarian without having defined the user signing key, the following error occurs:

subprocess.CalledProcessError: Command '['git', 'config', '--global', '--get', 'user.signingkey']' returned non-zero exit status 1.

This is caused by the method GitCommandWrapper:get_global_user, in which the following code is executed:

        signingkey = execute_console_command(
            "git config --global --get user.signingkey"
        ).strip()

The method execute_console_command is defined at mods/console/domain/utils.py, and invokes subprocess.run to execute the command, with check parameter set to true. This means that, if the command returns an error code, it will throw a CalledProcessError exception.

As the exception is not being handled, an error will occur if the Git user signing key is not defined. This may happen in several scenarios, most typical of which is a user that does not care about commit signing, and may not even have a key defined (or not know how to do it)

We should not prevent users without signing keys to use the library, so this should be controlled. A warning message may be displayed, but functionality should remain the same.

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

No branches or pull requests

1 participant