
This lets us look up remotes by name, which is not possible by just returning the list of remotes. Move remote creation to Repostiory.remotes.create() and keep the old Repository.create_remote() for compatibility, delegating to this new way. Existing code should keep working, but this moves us towards what we'd need for a better interface in 0.22 which makes remote renaming and deleting work with a name rather than an instance and would make sense to exist as part of an Remote.remotes object.
49 lines
1.3 KiB
ReStructuredText
49 lines
1.3 KiB
ReStructuredText
**********************************************************************
|
|
Remotes
|
|
**********************************************************************
|
|
|
|
.. autoattribute:: pygit2.Repository.remotes
|
|
.. automethod:: pygit2.Repository.create_remote
|
|
|
|
The remote collection
|
|
==========================
|
|
|
|
.. autoclass:: pygit2.remote.RemoteCollection
|
|
:members:
|
|
|
|
The Remote type
|
|
====================
|
|
|
|
.. autoclass:: pygit2.Remote
|
|
:members:
|
|
|
|
The TransferProgress type
|
|
===========================
|
|
|
|
This class contains the data which is available to us during a fetch.
|
|
|
|
.. autoclass:: pygit2.remote.TransferProgress
|
|
:members:
|
|
|
|
The Refspec type
|
|
===================
|
|
|
|
.. autoclass:: pygit2.refspec.Refspec
|
|
:members:
|
|
|
|
Credentials
|
|
================
|
|
|
|
.. automethod:: pygit2.Remote.credentials
|
|
|
|
There are two types of credentials: username/password and SSH key
|
|
pairs. Both :py:class:`pygit2.UserPass` and :py:class:`pygit2.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.
|
|
|
|
.. autoclass:: pygit2.UserPass
|
|
.. autoclass:: pygit2.Keypair
|