libgit2 / libgit2/pygit2

Connect to a git server in port other than 22

Đang mở
#926 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ả

In git, there are two ways to connect/clone a remote repository:

git clone git@git-in-port-22.com:libgit2/pygit2.git
git clone ssh://git@git-in-another-port.com:2345/libgit2/pygit2.git

and the 2nd one support to connect to a remote git server which is not in port 22.

In pygit2 doc, the connection is through

pygit2.clone_repository("ssh://git@github.com/libgit2/pygit2", "pygit2.git",
                        callbacks=callbacks)

After confirmed git clone ssh://git@localhost:8822/home/git/server.git can succeed, I tried

pygit2.clone_repository("ssh://git@localhost:8822/home/git/", "server.git")

but

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pygit2/__init__.py", line 263, in clone_repository
    check_error(err)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/site-packages/pygit2/errors.py", line 64, in check_error
    raise GitError(message)
_pygit2.GitError: unsupported URL protocol

I wonder if there's a way to specify a customized port?

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

Bắt đầu tại điểm vào pygit2.clone_repository và tái hiện lệnh clone ssh://localhost:8822 đã được báo cáo. Theo dõi cách URL được phân tích và truyền đến SSH transport, sau đó xác minh rằng việc clone từ một cổng khác 22 thành công mà không gặp lỗi giao thức URL không được hỗ trợ.

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ó
4/5
Thời gian dự kiến
3-5 ngày
Mức độ hoạt động
Đình trệ
Độ rõ ràng
Khá rõ ràng
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.