public virtual void TestMissingPort() { string incorrectSshUrl = "ssh://some-host:/path/to/repository.git"; URIish u = new URIish(incorrectSshUrl); NUnit.Framework.Assert.IsFalse(TransportGitSsh.CanHandle(u)); }
/// <exception cref="NGit.Errors.TransportException"></exception> internal SshPushConnection(TransportGitSsh _enclosing, TransportGitSsh.Connection conn) : base(_enclosing) { this._enclosing = _enclosing; this.conn = conn; try { MessageWriter msg = new MessageWriter(); this.SetMessageWriter(msg); conn.Exec(this._enclosing.GetOptionReceivePack()); InputStream rpErr = conn.GetErrorStream(); this.errorThread = new StreamCopyThread(rpErr, msg.GetRawStream()); this.errorThread.Start(); this.Init(conn.GetInputStream(), conn.GetOutputStream()); conn.Connect(); } catch (TransportException err) { this.Close(); throw; } catch (IOException err) { this.Close(); throw new TransportException(this.uri, JGitText.Get().remoteHungUpUnexpectedly, err ); } try { this.ReadAdvertisedRefs(); } catch (NoRemoteRepositoryException notFound) { string msgs = this.GetMessages(); this._enclosing.CheckExecFailure(conn.GetExitStatus(), this._enclosing.GetOptionReceivePack (), msgs); throw this._enclosing.CleanNotFound(notFound, msgs); } }
/// <exception cref="NGit.Errors.TransportException"></exception> public SshPushConnection(TransportGitSsh _enclosing) : base(_enclosing) { this._enclosing = _enclosing; try { this.process = this._enclosing.GetSession().Exec(this._enclosing.CommandFor(this. _enclosing.GetOptionReceivePack()), this._enclosing.GetTimeout()); MessageWriter msg = new MessageWriter(); this.SetMessageWriter(msg); InputStream rpErr = this.process.GetErrorStream(); this.errorThread = new StreamCopyThread(rpErr, msg.GetRawStream()); this.errorThread.Start(); this.Init(this.process.GetInputStream(), this.process.GetOutputStream()); } catch (TransportException err) { this.Close(); throw; } catch (IOException err) { this.Close(); throw new TransportException(this.uri, JGitText.Get().remoteHungUpUnexpectedly, err ); } try { this.ReadAdvertisedRefs(); } catch (NoRemoteRepositoryException notFound) { string msgs = this.GetMessages(); this._enclosing.CheckExecFailure(this.process.ExitValue(), this._enclosing.GetOptionReceivePack (), msgs); throw this._enclosing.CleanNotFound(notFound, msgs); } }
internal ExtSession(TransportGitSsh _enclosing) { this._enclosing = _enclosing; }
public _SshSessionFactory_134(TransportGitSsh _enclosing) { this._enclosing = _enclosing; }
internal ExtConnection(TransportGitSsh _enclosing) : base(_enclosing) { this._enclosing = _enclosing; }
internal Connection(TransportGitSsh _enclosing) { this._enclosing = _enclosing; }