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

Function test_keypair

test/test_credentials.py:107–116  ·  view source on GitHub ↗
(tmp_path: Path, pygit2_empty_key: tuple[Path, str, str])

Source from the content-addressed store, hash-verified

105@utils.requires_network
106@utils.requires_ssh
107def test_keypair(tmp_path: Path, pygit2_empty_key: tuple[Path, str, str]) -> None:
108 url = 'ssh://git@github.com/pygit2/empty'
109 with pytest.raises(pygit2.GitError):
110 pygit2.clone_repository(url, tmp_path)
111
112 prv, pub, secret = pygit2_empty_key
113
114 keypair = pygit2.Keypair('git', pub, prv, secret)
115 callbacks = pygit2.RemoteCallbacks(credentials=keypair)
116 pygit2.clone_repository(url, tmp_path, callbacks=callbacks)
117
118
119@utils.requires_network

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…