Skip to content

Unable to push #456

Closed
Closed
@KINFOO

Description

@KINFOO

Hi,

I am using pygit2==0.21.4. I try to push using KeypairFromAgent and I am having a Traceback. Here is my code:

from pygit2 import KeypairFromAgent, Repository

repository = Repository( '/home/kevin/.bee/repositories/bee_test_repository' )
signature = repository.default_signature
credentials = KeypairFromAgent('git')

for remote in repository.remotes:
    remote.credentials = credentials
    remote.push_url = remote.url
    print ('push url: {}'.format(remote.push_url) )
    remote.push('refs/heads/i18n', signature, 'Pushed!')

Here comes the Traceback:

$ python /tmp/sshkeypairfromagent.py
push url: ssh://[email protected]:7999/avtools/bee_test_repository.git
Traceback (most recent call last):
  File "/tmp/sshkeypairfromagent.py", line 11, in <module>
    remote.push('refs/heads/i18n', signature, 'Pushed!')
  File "/home/kevin/.virtualenvs/bee/lib/python3.4/site-packages/pygit2/remote.py", line 358, in push
    check_error(err)
  File "/home/kevin/.virtualenvs/bee/lib/python3.4/site-packages/pygit2/errors.py", line 56, in check_error
    raise GitError(message)
_pygit2.GitError: This transport isn't implemented. Sorry

I have read bugs #424 and #379 and tests. I still do not get what I am doing wrong. Any clue?

Kevin

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions