libgit2

git_remote_set_transport

Version:

Sets a custom transport for the remote. The caller can use this function to bypass the automatic discovery of a transport by URL scheme (i.e. http://, https://, git://) and supply their own transport to be used instead. After providing the transport to a remote using this function, the transport object belongs exclusively to that remote, and the remote will free it when it is freed with git_remote_free.

Signature

int git_remote_set_transport(git_remote *remote, git_transport *transport);

Parameters

In
remote

the remote to configure

In
transport

the transport object for the remote to use

Returns

int

0 or an error code

Versions