Gittle - "意外的关键字参数'pkey'"

Mic*_*ael 5 python git python-2.7

我正在尝试使用库gittle来克隆git存储库,我按照自述文件中的示例进行操作,这是我的代码.

repo_path = '/path/to/dir/'
repo_url  = 'git@gitlab.myproject/proj.git'
key = open('/path/to/.ssh/id_rsa')
auth = GittleAuth(pkey=key)
repo = Gittle.clone(repo_url, repo_path, auth=auth)
Run Code Online (Sandbox Code Playgroud)

当我尝试运行它时,我遇到了这个异常:

Traceback (most recent call last):
  File "gitCmd2.py", line 26, in <module>
    gitinit()
  File "gitCmd2.py", line 11, in gitinit
    repo = Gittle.clone(repo_url, repo_path, auth=auth)
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/gittle/gittle.py", line 439, in clone
    repo.fetch(bare=bare)
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/gittle/gittle.py", line 406, in fetch
    remote_refs = self.fetch_remote(origin_uri)
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/gittle/gittle.py", line 363, in fetch_remote
    client, remote_path = self.get_client(origin_uri=origin_uri)
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/gittle/gittle.py", line 327, in get_client
    client, remote_path = get_transport_and_path(origin_uri, **client_kwargs)
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/dulwich/client.py", line 1076, in get_transport_and_path
    return SSHGitClient(host, username=user, **kwargs), path
  File "/.virtualenvs/test_gittle/lib/python2.7/site-packages/dulwich/client.py", line 879, in __init__
    TraditionalGitClient.__init__(self, *args, **kwargs)
TypeError: __init__() got an unexpected keyword argument 'pkey'
Run Code Online (Sandbox Code Playgroud)

pip冻结的结果(python2.7):

dulwich==0.9.5
funky==0.0.2
gittle==0.3.0
mimer==0.0.1
paramiko==1.10.0
pycrypto==2.6
wsgiref==0.1.2
Run Code Online (Sandbox Code Playgroud)

谢谢.

Jan*_*sky 3

这是在 github 上提交的问题,名称为 TypeError: init () got an Unexpected keywords argument 'pkey'

那里也描述了解决方法 - 使用一些克隆版本dulwich