Note: This is a public test instance of Red Hat Bugzilla. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback at bugzilla.redhat.com.
Bug 1037922 - Work with GPG signed git commits
Summary: Work with GPG signed git commits
Keywords:
Status: CLOSED DUPLICATE of bug 1010706
Alias: None
Product: Fedora
Classification: Fedora
Component: GitPython
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Dennis Gilmore
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-12-04 04:50 UTC by Ankur Sinha (FranciscoD)
Modified: 2013-12-04 05:26 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-12-04 05:26:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Ankur Sinha (FranciscoD) 2013-12-04 04:50:30 UTC
Hi,

GitPython doesn't work with GPG signed git commits. It errors out:

    remote: Traceback (most recent call last):
    remote:   File "./hooks/post-receive-chained.d/post-receive-fedmsg", line 46, in <module>
    remote:     commits = map(_build_commit, lines)
    remote:   File "./hooks/post-receive-chained.d/post-receive-fedmsg", line 31, in _build_commit
    remote:     name=commit.author.name,
    remote:   File "/usr/lib64/python2.6/site-packages/gitdb/util.py", line 238, in __getattr__
    remote:     self._set_cache_(attr)
    remote:   File "/usr/lib/python2.6/site-packages/git/objects/commit.py", line 132, in _set_cache_
    remote:     self._deserialize(StringIO(stream.read()))
    remote:   File "/usr/lib/python2.6/site-packages/git/objects/commit.py", line 443, in _deserialize
    remote:     self.author.name = self.author.name.decode(self.encoding)
    remote: LookupError: unknown encoding: -----BEGIN PGP SIGNATURE-----

There's a pull request open at upstream's github instance, but since upstream is unresponsive, it hasn't been accepted yet. 

https://github.com/gitpython-developers/GitPython/pull/124

Unfortunately, master and the 0.3 branch are quite different and seem to be developed in parallel, so a patch isn't very simple to extract from the repository. Commit 62ecd6c is the latest commit with the gpg fix:

https://github.com/sugi/GitPython/tree/gpg-sig-support

It's 2 commits ahead of master.

Thanks,
Warm regards,
Ankur

Comment 1 Igor Gnatenko 2013-12-04 05:26:34 UTC

*** This bug has been marked as a duplicate of bug 1010706 ***


Note You need to log in before you can comment on or make changes to this bug.