pygit2.GitError: failed to parse supported auth schemes: The operation identifier is not valid.
Dieses Issue hat noch niemand übernommen.
- Vorherrschende Sprache
- Python
- Sterne
- 1.7k
- Forks
- 408
- Ø Merge
- 2 T. 57 Min.
- Gemergte PRs (30 T.)
- 7
Beschreibung
I am trying to clone private github repository using pygit2 module but getting the below error.
Traceback (most recent call last):
File ".\test2.py", line 29, in <module>
repoClone = pygit2.clone_repository(repo_from_template.clone_url, 'C://TestRepo', callbacks=callbacks)
File "C:\Anaconda3\lib\site-packages\pygit2\__init__.py", line 222, in clone_repository
payload.check_error(err)
File "C:\Anaconda3\lib\site-packages\pygit2\callbacks.py", line 93, in check_error
check_error(error_code)
File "C:\Anaconda3\lib\site-packages\pygit2\errors.py", line 65, in check_error
raise GitError(message)
_pygit2.GitError: failed to parse supported auth schemes: The operation identifier is not valid.
Below is the source code I am using
import pygit2
import config_
from github import Github
g = Github(<personal access token>,base_url='https://api.github.com')
github_user = g.get_user()
org = g.get_organization(<org-name>)
repo_from_template=org.create_repo(name='TestRepo',private=True)
credentials = pygit2.UserPass(github_user.login, <personal access token>)
callbacks = pygit2.RemoteCallbacks(credentials=credentials)
repoClone = pygit2.clone_repository(repo_from_template.clone_url, 'C://TestRepo', callbacks=callbacks)
I am using python 3.9 and have tried pygit2 version 1.10.1 and 1.12.0 and both are giving the same error.
Are there any changes made to the callbacks recently which is creating this issue?
Beitragsleitfaden
Erste Schritte
- Lies das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreib ins Issue, dass du es übernimmst — das erspart doppelte Arbeit.
- Forke das Repository und arbeite in einem Branch.
- Öffne einen Pull Request, der die Issue-Nummer nennt.
Rechercherichtung
Reproduzieren Sie den Fehler aus dem clone_repository-Aufruf des Issues mit RemoteCallbacks und UserPass-Anmeldedaten gegenüber einem privaten GitHub-Repository unter Python 3.9, indem Sie pygit2 1.10.1 und 1.12.0 testen. Verfolgen Sie den im Traceback genannten Callback- und Authentifizierungspfad; abgeschlossen, wenn die Ursache identifiziert ist und das Klonen privater Repositories gelingt oder die Inkompatibilität eindeutig dokumentiert ist.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- git, github, python
- Bereich
- authentication, devtools
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 45/100