MCPcopy Create free account
hub / github.com/libgit2/pygit2 / credentials

Method credentials

test/test_repository.py:784–790  ·  view source on GitHub ↗
(
            self,
            url: str,
            username_from_url: str | None,
            allowed_types: CredentialType,
        )

Source from the content-addressed store, hash-verified

782def test_clone_bad_credentials(tmp_path: Path) -> None:
783 class MyCallbacks(pygit2.RemoteCallbacks):
784 def credentials(
785 self,
786 url: str,
787 username_from_url: str | None,
788 allowed_types: CredentialType,
789 ) -> Username | UserPass | Keypair:
790 raise RuntimeError('Unexpected error')
791
792 url = 'https://github.com/github/github'
793 with pytest.raises(RuntimeError) as exc:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected