Connect to the remote. Parameters: proxy : None or True or str Proxy configuration. Can be one of: * `None` (the default) to disable proxy usage * `True` to enable automatic proxy detection * an url to a proxy (`http://proxy.example.
(
self,
callbacks: RemoteCallbacks | None = None,
direction: int = C.GIT_DIRECTION_FETCH,
proxy: None | bool | str = None,
)
| 172 | return maybe_string(C.git_remote_pushurl(self._remote)) |
| 173 | |
| 174 | def connect( |
| 175 | self, |
| 176 | callbacks: RemoteCallbacks | None = None, |
| 177 | direction: int = C.GIT_DIRECTION_FETCH, |
| 178 | proxy: None | bool | str = None, |
| 179 | ) -> None: |
| 180 | """Connect to the remote. |
| 181 | |
| 182 | Parameters: |
| 183 | |
| 184 | proxy : None or True or str |
| 185 | Proxy configuration. Can be one of: |
| 186 | |
| 187 | * `None` (the default) to disable proxy usage |
| 188 | * `True` to enable automatic proxy detection |
| 189 | * an url to a proxy (`http://proxy.example.org:3128/`) |
| 190 | """ |
| 191 | with git_proxy_options(self, proxy=proxy) as proxy_opts: |
| 192 | with git_remote_callbacks(callbacks) as payload: |
| 193 | err = C.git_remote_connect( |
| 194 | self._remote, |
| 195 | direction, |
| 196 | payload.remote_callbacks, |
| 197 | proxy_opts, |
| 198 | ffi.NULL, |
| 199 | ) |
| 200 | payload.check_error(err) |
| 201 | |
| 202 | def fetch( |
| 203 | self, |