libgit2 / libgit2/pygit2

Unable to ssh push in pygit2

Đang mở
#1,174 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Chưa có ai nhận issue này.

Ngôn ngữ chính
Python
Star
1.7k
Fork
408
Merge trung bình
2 ngày 57 phút
Pull request đã merge (30 ngày)
7

Mô tả

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

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Hướng nghiên cứu

Traceback trỏ đến pygit2/remote.py trong Remote.push, nơi payload.check_error(err) được gọi. Hãy tái hiện lỗi SSH push và kiểm tra chữ ký của check_error cùng luồng push xung quanh; công việc được xem là hoàn tất khi SSH push không còn gây ra TypeError này.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Đánh giá

Công nghệ
git, python
Lĩnh vực
tooling
Loại issue
Lỗi
Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Cần làm rõ
Mức phù hợp với người mới
35/100

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.