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

  发布于 2023-01-20 09:42

我正在尝试使用库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)

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

Traceback (most recent call last):
  File "gitCmd2.py", line 26, in 
    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'

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

谢谢.

撰写答案
今天,你开发时遇到什么问题呢?
立即提问
热门标签
PHP1.CN | 中国最专业的PHP中文社区 | PNG素材下载 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有