Connect to a git server in port other than 22
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
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- 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.
- Fork repository và làm thay đổi trên một nhánh.
- 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