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

Git write-back method and gpg-signed commits #427

Closed
vgrigoruk opened this issue Apr 29, 2022 · 5 comments · May be fixed by #428
Closed

Git write-back method and gpg-signed commits #427

vgrigoruk opened this issue Apr 29, 2022 · 5 comments · May be fixed by #428
Labels
enhancement New feature or request

Comments

@vgrigoruk
Copy link

Is your feature request related to a problem? Please describe.
We use git write-back method, but our repository has branch protection rules, which require all commits to main branch to be signed with a gpg key. It looks like there is partial support for passing gpg key id to the git commit command here, but I can not find a way to configure both CommitOptions.SigningKey and CommitOptions.SignOff options.

Describe the solution you'd like
Support configuring these setting via --git-commit-signing-key and --git-commit-sign-offcli args and GIT_COMMIT_SIGNING_KEY and GIT_COMMIT_SIGN_OFF env vars here

Describe alternatives you've considered
Disable require signed commits requirement in main branch protection rules.

@vgrigoruk vgrigoruk added the enhancement New feature or request label Apr 29, 2022
vgrigoruk added a commit to vgrigoruk/argocd-image-updater that referenced this issue Apr 29, 2022
@Den4200
Copy link

Den4200 commented Jul 18, 2023

Any chance that the changes from the commit that referenced this issue will be ported upstream?

dlactin pushed a commit to dlactin/argocd-image-updater that referenced this issue May 10, 2024
@smhrazacb
Copy link

smhrazacb commented Jun 26, 2024

same issue, is there any solution?

time="2024-06-26T07:21:18Z" level=debug msg="Writing commit message to /tmp/image-updater-commit-msg1646947728" application=cicd-argo-application
time="2024-06-26T07:21:18Z" level=info msg="git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728" dir=/tmp/git-cicd-argo-application3650244213 execID=06adc
time="2024-06-26T07:21:18Z" level=error msg="`git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728` failed exit status 128: error: cannot run gpg: No such file or directory\nerror: gpg failed to sign the data:\n(no gpg output)\nfatal: failed to write commit object" execID=06adc
time="2024-06-26T07:21:18Z" level=info msg=Trace args="[git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728]" dir=/tmp/git-cicd-argo-application3650244213 operation_name="exec git" time_ms=5.5094970000000005
time="2024-06-26T07:21:18Z" level=error
time="2024-06-26T07:21:18Z" level=info msg="Processing results: applications=1 images_considered=1 images_skipped=0 images_updated=0 errors=1"
time="2024-06-26T07:21:18Z" level=error msg="Could not update application spec: `git -c gpg.format=openpgp commit -a -S -F /tmp/image-updater-commit-msg1646947728` failed exit status 128: error: cannot run gpg: No such file or directory\nerror: gpg failed to sign the data:\n(no gpg output)\nfatal: failed to write commit object" application=cicd-argo-application

@chengfang
Copy link
Collaborator

This issue should already be resolved by #710 . From the error above, it looks like the gpg executable is not available.

@zagr0
Copy link

zagr0 commented Jul 3, 2024

we have the same errors. gpg executable is missing in the image of updater, shouldn't it be part of it?

@chengfang
Copy link
Collaborator

chengfang commented Jul 5, 2024

This issue (error: cannot run gpg: No such file or directory) is fixed by #767

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

Successfully merging a pull request may close this issue.

5 participants