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

Class UserPass

pygit2/credentials.py:60–82  ·  view source on GitHub ↗

Username/Password credentials This is an object suitable for passing to a remote's credentials callback and for returning from said callback.

Source from the content-addressed store, hash-verified

58
59
60class UserPass:
61 """Username/Password credentials
62
63 This is an object suitable for passing to a remote's credentials
64 callback and for returning from said callback.
65 """
66
67 def __init__(self, username: str, password: str):
68 self._username = username
69 self._password = password
70
71 @property
72 def credential_type(self) -> CredentialType:
73 return CredentialType.USERPASS_PLAINTEXT
74
75 @property
76 def credential_tuple(self) -> tuple[str, str]:
77 return (self._username, self._password)
78
79 def __call__(
80 self, _url: str, _username: str | None, _allowed: CredentialType
81 ) -> UserPass:
82 return self
83
84
85class Keypair:

Callers 3

test_userpassFunction · 0.90
test_user_passFunction · 0.90
test_proxyFunction · 0.90

Calls

no outgoing calls

Tested by 3

test_userpassFunction · 0.72
test_user_passFunction · 0.72
test_proxyFunction · 0.72

Used in the wild real call sites across dependent graphs

searching dependent graphs…