Creates and destroys SSH connections to a remote system. Different implementations of the session factory may be used to control communicating with the end-user as well as reading their personal SSH configuration settings, such as known hosts and private keys. A Session must be returned to the factory that created it. Callers are encouraged to retain the SshSessionFactory for the duration of the period they are using the Session.
 /// <summary>
 /// Change the JVM-wide factory to a different implementation.
 /// </summary>
 /// <param name="newFactory">
 /// factory for future sessions to be created through. If null the
 /// default factory will be restored.
 /// </param>
 public static void setInstance(SshSessionFactory newFactory)
 {
     if (newFactory != null)
         Instance = newFactory;
     else
     {
         Instance = new DefaultSshSessionFactory();
     }
 }
Beispiel #2
0
 /// <summary>
 /// Create a new transport instance.
 /// </summary>
 /// <param name="local">
 /// the repository this instance will fetch into, or push out of.
 /// This must be the repository passed to
 /// <see cref="Transport.open(GitSharp.Core.Repository,GitSharp.Core.Transport.URIish)"/>.
 /// </param>
 /// <param name="uri">
 /// the URI used to access the remote repository. This must be the
 /// URI passed to {@link #open(Repository, URIish)}.
 /// </param>
 protected SshTransport(Repository local, URIish uri)
     : base(local, uri)
 {
     _sch = SshSessionFactory.Instance;
 }
Beispiel #3
0
 protected SshTransport(Repository local, URIish uri)
     : base(local, uri)
 {
     _sch = SshSessionFactory.Instance;
 }