python - An error in signature when pushing using pygi2 -


i'm facing problem when pushing using pygit2 v0.21.3 . here code :

import pygit2 git repo = git.repository("path/to/my/repo.git") # testing,it not local  rem in repo.remotes:     rem.push_url = rem.url     rem.credentials = git.userpass("user","passowrd")     sig = git.signature("user","user@example.com")      rem.push('refs/heads/master',signature=sig)     # in v0.22.0 below     # rem.push(['refs/heads/master'],signature=sig) 

but,i received message :

traceback (most recent call last):   file "c:\test.py", line 9, in <module>     rem.push('refs/heads/master',signature=sig)   file "c:\python34\lib\site-packages\pygit2-0.21.3-py3.4-win32.egg\pygit2\remote.py",line 353, in push     err = c.git_push_update_tips(push, ptr, to_bytes(message)) typeerror: initializer ctype 'git_signature *' must cdata pointer, not bytes 

when tried version 0.22.0 didn't raise error, push operation didn't work.

note: think problem signature parameter, because when pass none works fine default signature .

thanks.

i had updated pygit2 v0.22.1, libgit2 v0.22.3 , fixed problem.


Comments

Popular posts from this blog

android - Pass an Serializable object in AIDL -

How to provide Authorization & Authentication using Asp.net, C#? -

How to use Authorization & Authentication in Asp.net, C#? -