Git HTTP Auth breaks w/1.14
Đang mở
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ả
Upgrading to 1.14.0, and cloning via HTTP auth (username + password) gives this stack trace:
File "/opt/conda/lib/python3.10/site-packages/pygit2/remotes.py", line 171, in ls_remotes
self.connect(callbacks=callbacks, proxy=proxy)
File "/opt/conda/lib/python3.10/site-packages/pygit2/remotes.py", line 120, in connect
payload.check_error(err)
File "/opt/conda/lib/python3.10/site-packages/pygit2/callbacks.py", line 93, in check_error
raise self._stored_exception
File "/opt/conda/lib/python3.10/site-packages/pygit2/callbacks.py", line 416, in wrapper
return f(*args)
File "/opt/conda/lib/python3.10/site-packages/pygit2/callbacks.py", line 484, in _credentials_cb
ccred = get_credentials(credentials, url, username, allowed)
File "/opt/conda/lib/python3.10/site-packages/pygit2/callbacks.py", line 569, in get_credentials
creds = fn(url_str, username_str, allowed)
File "/opt/conda/lib/python3.10/site-packages/scmrepo/git/backend/pygit2/callbacks.py", line 51, in credentials
from pygit2.credentials import GIT_CREDENTIAL_USERPASS_PLAINTEXT, UserPass
ImportError: cannot import name 'GIT_CREDENTIAL_USERPASS_PLAINTEXT' from 'pygit2.credentials' (/opt/conda/lib/python3.10/site-packages/pygit2/credentials.py)
Version 1.13.3 works fine though :).
Thanks.
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 bằng cách so sánh các API credentials của pygit2 1.13.3 và 1.14.0, tập trung vào import trong scmrepo/git/backend/pygit2/callbacks.py. Tái hiện một HTTP clone bằng tên người dùng và mật khẩu, sau đó xác minh rằng việc xác thực hoạt động với pygit2 1.14.0 mà không có ImportError đã được báo cáo.
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
- authentication, backend
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 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
- 45/100