In my GitHub Repository i have a branch , with some commits that are unverified, is there any way to change them to verified ?
Any of the following is true: - The commit is signed but the signature could not be verified. - The commit is not signed and the committer has enabled vigilant mode. - The commit is not signed and an author has enabled vigilant mode.
When you submit your public key in GitHub, GitHub can verify that the signed commit was created by your account. All it means is that anyone with access to the repository can see that the commit was made on your system by somehow who knows the passphrase to unlock your public key. Ideally, this can only be you.
Verify your signed tag by running git tag -v [tag-name] .
Unverified means your signature is wrong.
This can be if you commit with the wrong E-Mail/Password, if you haven't uploaded the Signature on GitHub(on that account) or if you've uploaded it wrongly.
I think this is because you use the signature of your main account for committing with the other (maybe non-existing) account (maybe because you activated commit.autosign
).
Your signature has to contain the E-Mail address of the account(that committed) and that account has to have the signature (with the E-Mail) uploaded on GitHub.
A commit from a non-existing user cannot be verified on GitHub too.
If you want to verify existing commits, you have to overwrite them.
You can do this by re-committing it:
git rebase -i <commit before first problematic commit>
After this, your text editor will open up. Change every pick
to edit
.
After that you'll have to re-commit every commit with the following command:
git commit --author="<name> <<E-Mail(once in brackets, see example)>>" -S --amend --no-edit
git rebase --continue
In the end, you'll have to overwrite the remote by doing
git push --force-with-lease
This is better than git push -f
but you should also be careful.
If someone knows a way to do this automatically, tell me in the comments.
example of the commit command:
git commit --author="testuser <[email protected]>" -S --amend --no-edit
You also could do this using the git filter-branch
command.
See this for details.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With