-
-
Notifications
You must be signed in to change notification settings - Fork 386
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to push #456
Comments
You need to have the development files for libssh2 are available when building libgit2, or it won't be able to connect via ssh. |
So, I was doing wrong, thanks Carlos. I read it somewhere in the docs but unfortunately assumed that I had Do you think it woth adding a trouble shooting_ section in push docs. I could provide a pull request for it. Thanks a lot |
I am using #!/bin/env python
from pygit2 import KeypairFromAgent, Repository
repository = Repository('/home/kevin/.bee/repositories/bee_test_repository')
remote = repository.remotes[0]
remote.credentials = KeypairFromAgent('git')
remote.push_url = remote.url
print('Signature type: {}'.format(repository.default_signature))
print('Push url: {}'.format(remote.push_url))
remote.push('refs/heads/i18n', repository.default_signature, 'Hourray') But $ python /tmp/push.py
Signature type: <_pygit2.Signature object at 0x7f1e1ccd43f0>
Push url: ssh://[email protected]:7999/avtools/bee_test_repository.git
Traceback (most recent call last):
File "/tmp/push.py", line 10, in <module>
remote.push('refs/heads/i18n', repository.default_signature, 'Hourray')
File "/home/kevin/.virtualenvs/bee/lib/python3.4/site-packages/pygit2/remote.py", line 378, in push
err = C.git_push_update_tips(push, ptr, to_bytes(message))
TypeError: initializer for ctype 'git_signature *' must be a cdata pointer, not bytes Am I (again) missing something out? Kevin |
Regarding the documentation, I would document it in the requirements section of the install page, see http://www.pygit2.org/install.html#requirements A PR would be very much appreciated. |
If you're going to use the default signature, you might as well pass |
@carlosmn Works like a charm. I will use this issue for installation documentation PR. Thanks for the awesome work. |
It has to be available when building `libgit2`. Fixes libgit2#456
Tell me if the previous suffice. I tried to find which version of I am available for any PR improvement. Kevin |
Hi,
I am using
pygit2==0.21.4
. I try to push usingKeypairFromAgent
and I am having a Traceback. Here is my code:Here comes the Traceback:
I have read bugs #424 and #379 and tests. I still do not get what I am doing wrong. Any clue?
Kevin
The text was updated successfully, but these errors were encountered: