pygit2.GitError: failed to parse supported auth schemes: The operation identifier is not valid.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 1.7k
- Forks
- 408
- Avg merge
- 2d 57m
- Merged PRs (30d)
- 7
Description
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?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the failure from the issue's clone_repository call using RemoteCallbacks with UserPass credentials against a private GitHub repository on Python 3.9, testing pygit2 1.10.1 and 1.12.0. Trace the callback and authentication path named by the traceback; done when the cause is identified and private cloning succeeds or the incompatibility is clearly documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- git, github, python
- Domain
- authentication, devtools
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100