how to create a signed tag with pygit2 API

27 Views Asked by At

I am an experienced Python developer, but not quite familiar with pygit2 and git related stuff.

Recently, I need to implement some functionality for operations on git repository.

One of it is to create a signed tag with pygit2 and python-gnupg.

https://www.pygit2.org/

https://gnupg.readthedocs.io/en/latest/

I can successfully create signed commit and there is a lot of documents and posts related to signed commit via pygit2. But for signed tag, it seems that its format is slightly different from signed commit. And there is no document about it.

I have read https://git-scm.com/docs/signature-format. It seems that signature on git tag is appending to it.

I have found this https://github.com/libgit2/pygit2/issues/1276. It is asked by someone else before me. But not get response yet.

Can anyone tell me how git signed tag works in low level and show me some sample code?

0

There are 0 best solutions below