我正在尝试使用库特技来克隆git存储库,我遵循了自述文件中的示例,这是我的代码。

repo_path = '/path/to/dir/'
repo_url  = '[email protected]/proj.git'
key = open('/path/to/.ssh/id_rsa')
auth = GittleAuth(pkey=key)
repo = Gittle.clone(repo_url, repo_path, auth=auth)

当我尝试运行此命令时,出现以下异常:
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'

点卡住的结果(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

谢谢你。

最佳答案

此问题已提交至github as TypeError: init() got an unexpected keyword argument 'pkey'

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

关于python - Gittle- "unexpected keyword argument ' pkey'“,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/22175245/

10-14 23:50