Unable to ssh push in pygit2
未关闭
还没有人认领这个 Issue。
- 主要语言
- Python
- 星标
- 1.7k
- 派生
- 408
- 平均合并
- 2 天 57 分钟
- 30 天内合并 PR
- 7
描述
self = <pygit2.remote.Remote object at 0x10acc76a0>, specs = ['refs/heads/git-push-test-ssh'], callbacks = <class 'fixtures.repos.fixture_cli.MyRemoteCallbacks'>
proxy = None
def push(self, specs, callbacks=None, proxy=None):
"""
Push the given refspec to the remote. Raises ``GitError`` on protocol
error or unpack failure.
When the remote has a githook installed, that denies the reference this
function will return successfully. Thus it is strongly recommended to
install a callback, that implements
:py:meth:`RemoteCallbacks.push_update_reference` and check the passed
parameters for successfull operations.
Parameters:
specs : [str]
Push refspecs to use.
proxy : None or True or str
Proxy configuration. Can be one of:
* `None` (the default) to disable proxy usage
* `True` to enable automatic proxy detection
* an url to a proxy (`http://proxy.example.org:3128/`)
"""
with git_push_options(callbacks) as payload:
opts = payload.push_options
self.__set_proxy(opts.proxy_opts, proxy)
with StrArray(specs) as refspecs:
err = C.git_remote_push(self._remote, refspecs, opts)
payload.check_error(err)
E TypeError: check_error() missing 1 required positional argument: 'error_code'
.venv/lib/python3.9/site-packages/pygit2/remote.py:257: TypeError
贡献指南
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
调研方向
回溯信息指向 Remote.push 中的 pygit2/remote.py,其中调用了 payload.check_error(err)。复现 SSH push 失败,并检查 check_error 的签名及其周围的 push 流程;当 SSH push 不再引发此 TypeError 时,即表示完成。
由索引模型根据 Issue 内容生成。
评估
- 技术栈
- git, python
- 领域
- tooling
- Issue 类型
- 缺陷
- 难度
- 2/5
- 预计耗时
- 1-3 小时
- 活跃度
- 停滞
- 描述清晰度
- 需要澄清
- 新手友好度
- 35/100