libgit2 / libgit2/pygit2

Git HTTP Auth breaks w/1.14

オープン
#1,274 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

主要言語
Python
スター
1.7k
フォーク
408
平均マージ
2日 57分
マージ済み PR(30日)
7

説明

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.

コントリビューションガイド

コントリビューションガイドを開く

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

調査の方向性

まず、pygit2 1.13.3 と 1.14.0 の credentials API を比較し、scmrepo/git/backend/pygit2/callbacks.py の import に注目します。ユーザー名とパスワードを使用した HTTP clone を再現し、報告されている ImportError なしで pygit2 1.14.0 による認証が機能することを確認します。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
git, python
領域
authentication, backend
issue の種類
バグ
難易度
3/5
見積もり時間
1〜2日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
45/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。