git_remote_connect

Open a connection to a remote.

The transport is selected based on the URL; the direction argument is due to a limitation of the git protocol which starts up a specific binary which can only do the one or the other.

Parameters

remote libgit2.types.git_remote*

the remote to connect to

direction libgit2.net.git_direction

GIT_DIRECTION_FETCH if you want to fetch or GIT_DIRECTION_PUSH if you want to push

callbacks const(.git_remote_callbacks)*

the callbacks to use for this connection

proxy_opts const(libgit2.proxy.git_proxy_options)*

proxy settings

custom_headers const(libgit2.strarray.git_strarray)*

extra HTTP headers to use in this connection

Return Value

Type: int

0 or an error code

Meta