Skip to content
This repository has been archived by the owner on Feb 16, 2022. It is now read-only.

Single-step signing command does not work as documented #17

Open
alexey-igrychev opened this issue Feb 7, 2022 · 0 comments
Open

Single-step signing command does not work as documented #17

alexey-igrychev opened this issue Feb 7, 2022 · 0 comments

Comments

@alexey-igrychev
Copy link

alexey-igrychev commented Feb 7, 2022

The command git signatures add --push v1.0.0 does not perform pull/merge and cannot be used as a single step.
Readme: https://github.com/hashbang/git-signatures#pullmergesignpush-against-origin-as-single-step.

Example

git signatures add --push

$ git signatures add --push REF

Updated tag 'latest-signature' (was 910391335)
Enumerating objects: 6, done.
Counting objects: 100% (6/6), done.
Delta compression using up to 8 threads
Compressing objects: 100% (6/6), done.
Writing objects: 100% (6/6), 1.43 KiB | 1.43 MiB/s, done.
Total 6 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
 + 4b72ca355...5fe9bf926 latest-signature -> latest-signature (forced update)
 ! [rejected]            refs/notes/signatures -> refs/notes/signatures (fetch first)
error: failed to push some refs to 'github.com:foo/bar.git'
hint: Updates were rejected because the remote contains work that you do
hint: not have locally. This is usually caused by another repository pushing
hint: to the same ref. You may want to first integrate the remote changes
hint: (e.g., 'git pull ...') before pushing again.
hint: See the 'Note about fast-forwards' in 'git push --help' for details.

✔️ git signatures pull && git signatures add --push

$ git signatures pull
remote: Enumerating objects: 5, done.
remote: Counting objects: 100% (5/5), done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 3 (delta 0), pack-reused 0
Unpacking objects: 100% (3/3), 1.26 KiB | 647.00 KiB/s, done.
 * [new ref]             refs/notes/signatures -> refs/notes/origin/signatures
 * [new tag]             latest-signature      -> origin/latest-signature

$ git signatures add --push REF
Updated tag 'latest-signature' (was 5fe9bf926)
Enumerating objects: 8, done.
Counting objects: 100% (8/8), done.
Delta compression using up to 8 threads
Compressing objects: 100% (5/5), done.
Writing objects: 100% (5/5), 1.45 KiB | 1.45 MiB/s, done.
Total 5 (delta 1), reused 0 (delta 0), pack-reused 0
remote: Resolving deltas: 100% (1/1), done.
   4b72ca355..44cb65bd4  refs/notes/signatures -> refs/notes/signatures
 + 5fe9bf926...44cb65bd4 latest-signature -> latest-signature (forced update)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant