libgit2 / libgit2/pygit2

Unable to ssh push in pygit2

Offen
#1,174 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen

Dieses Issue hat noch niemand übernommen.

Vorherrschende Sprache
Python
Sterne
1.7k
Forks
408
Ø Merge
2 T. 57 Min.
Gemergte PRs (30 T.)
7

Beschreibung

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

Beitragsleitfaden

Beitragsleitfaden öffnen

Erste Schritte

  1. Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
  2. Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
  3. Forke das Repository und arbeite in einem Branch.
  4. Öffne einen Pull Request, der die Issue-Nummer nennt.

Rechercherichtung

Der Traceback verweist auf pygit2/remote.py in Remote.push, wo payload.check_error(err) aufgerufen wird. Reproduziere den SSH-Push-Fehler und untersuche die Signatur von check_error sowie den umgebenden Push-Ablauf; als erledigt gilt die Aufgabe, wenn der SSH-Push diesen TypeError nicht mehr auslöst.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
git, python
Bereich
tooling
Issue-Typ
Bug
Schwierigkeit
2/5
Geschätzter Aufwand
1-3 Stunden
Aktivitätsstatus
Veraltet
Klarheit
Muss geklärt werden
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.