deb-python-pygit2/docs/remotes.rst

1.6 KiB

Remotes

The collection of configured remotes, an instance of :pypygit2.remote.RemoteCollection

pygit2.Repository.create_remote

The remote collection

pygit2.remote.RemoteCollection

The Remote type

pygit2.Remote

The RemoteCallbacks type

pygit2.RemoteCallbacks

The TransferProgress type

This class contains the data which is available to us during a fetch.

pygit2.remote.TransferProgress

The Refspec type

Refspecs objects are not constructed directly, but returned by pygit2.Remote.get_refspec. To create a new a refspec on a Remote, use pygit2.Remote.add_fetch or pygit2.Remote.add_push.

pygit2.refspec.Refspec

Credentials

There are two types of credentials: username/password and SSH key pairs. Both :pypygit2.UserPass and :pypygit2.Keypair are callable objects, with the appropriate signature for the credentials callback. They will ignore all the arguments and return themselves. This is useful for scripts where the credentials are known ahead of time. More complete interfaces would want to look up in their keychain or ask the user for the data to use in the credentials.

pygit2.UserPass

pygit2.Keypair