libgit2 / libgit2/pygit2

Unable to ssh push in pygit2

オープン
#1,174 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1.7k
フォーク
408
平均マージ
2日 57分
マージ済み PR(30日)
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

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

トレースバックは、payload.check_error(err) が呼び出されている Remote.push 内の pygit2/remote.py を指しています。SSH push の失敗を再現し、check_error のシグネチャと周辺の push フローを調査してください。SSH push がこの TypeError を発生させなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, python
領域
tooling
issue の種類
バグ
難易度
2/5
見積もり時間
1〜3時間
活発さ
停滞
明瞭さ
説明が足りない
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。