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

Method credentials

pygit2/callbacks.py:151–177  ·  view source on GitHub ↗

Credentials callback. If the remote server requires authentication, this function will be called and its return value used for authentication. Override it if you want to be able to perform authentication. Returns: credential Parameters: ur

(
        self,
        url: str,
        username_from_url: str | None,
        allowed_types: CredentialType,
    )

Source from the content-addressed store, hash-verified

149 """
150
151 def credentials(
152 self,
153 url: str,
154 username_from_url: str | None,
155 allowed_types: CredentialType,
156 ) -> _Credentials:
157 """
158 Credentials callback. If the remote server requires authentication,
159 this function will be called and its return value used for
160 authentication. Override it if you want to be able to perform
161 authentication.
162
163 Returns: credential
164
165 Parameters:
166
167 url : str
168 The url of the remote.
169
170 username_from_url : str or None
171 Username extracted from the url, if any.
172
173 allowed_types : CredentialType
174 A combination of CredentialType bitflags representing the
175 credential types supported by the remote.
176 """
177 raise Passthrough
178
179 def certificate_check(self, certificate: None, valid: bool, host: bytes) -> bool:
180 """

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected