Package org.eclipse.jgit.errors

Examples of org.eclipse.jgit.errors.TransportException


    @Override
    public RemoteSession getSession(URIish uri, CredentialsProvider credentialsProvider, FS fs, int tms) throws TransportException {
        try {
            return new SshdSession(uri, credentialsProvider, fs, tms);
        } catch (Exception e) {
            throw new TransportException("Unable to connect", e);
        }
    }
View Full Code Here


    } catch (CancelledException ce) {
      close();
      return; // Caller should test (or just know) this themselves.
    } catch (IOException err) {
      close();
      throw new TransportException(err.getMessage(), err);
    } catch (RuntimeException err) {
      close();
      throw new TransportException(err.getMessage(), err);
    }
  }
View Full Code Here

        s.close();
      } catch (IOException closeErr) {
        // ignore a failure during close, we're already failing
      }
      if (c instanceof UnknownHostException)
        throw new TransportException(uri, JGitText.get().unknownHost);
      if (c instanceof ConnectException)
        throw new TransportException(uri, c.getMessage());
      throw new TransportException(uri, c.getMessage(), c);
    }
    return s;
  }
View Full Code Here

        init(sIn, sOut);
        service("git-upload-pack", pckOut);
      } catch (IOException err) {
        close();
        throw new TransportException(uri,
            JGitText.get().remoteHungUpUnexpectedly, err);
      }
      readAdvertisedRefs();
    }
View Full Code Here

        init(sIn, sOut);
        service("git-receive-pack", pckOut);
      } catch (IOException err) {
        close();
        throw new TransportException(uri,
            JGitText.get().remoteHungUpUnexpectedly, err);
      }
      readAdvertisedRefs();
    }
View Full Code Here

      if (!rru.isDelete())
        writePack = true;
    }

    if (monitor.isCancelled())
      throw new TransportException(uri, JGitText.get().pushCancelled);
    pckOut.end();
    outNeedsEnd = false;
  }
View Full Code Here

    final String unpackLine = readStringLongTimeout();
    if (!unpackLine.startsWith("unpack "))
      throw new PackProtocolException(uri, MessageFormat.format(JGitText.get().unexpectedReportLine, unpackLine));
    final String unpackStatus = unpackLine.substring("unpack ".length());
    if (!unpackStatus.equals("ok"))
      throw new TransportException(uri, MessageFormat.format(
          JGitText.get().errorOccurredDuringUnpackingOnTheRemoteEnd, unpackStatus));

    String refLine;
    while ((refLine = pckIn.readString()) != PacketLineIn.END) {
      boolean ok = false;
View Full Code Here

      } catch (IOException err) {
        for (final RemoteRefUpdate u : packedRefUpdates) {
          u.setStatus(Status.REJECTED_OTHER_REASON);
          u.setMessage(err.getMessage());
        }
        throw new TransportException(uri, JGitText.get().failedUpdatingRefs, err);
      }
    }

    try {
      refWriter.writeInfoRefs();
    } catch (IOException err) {
      throw new TransportException(uri, JGitText.get().failedUpdatingRefs, err);
    }
  }
View Full Code Here

    } catch (IOException err) {
      safeDelete(pathIdx);
      safeDelete(pathPack);

      throw new TransportException(uri, JGitText.get().cannotStoreObjects, err);
    } finally {
      writer.release();
    }
  }
View Full Code Here

    try {
      final String ref = "ref: " + pickHEAD(updates) + "\n";
      final byte[] bytes = Constants.encode(ref);
      dest.writeFile(ROOT_DIR + Constants.HEAD, bytes);
    } catch (IOException e) {
      throw new TransportException(uri, JGitText.get().cannotCreateHEAD, e);
    }

    try {
      final String config = "[core]\n"
          + "\trepositoryformatversion = 0\n";
      final byte[] bytes = Constants.encode(config);
      dest.writeFile(ROOT_DIR + Constants.CONFIG, bytes);
    } catch (IOException e) {
      throw new TransportException(uri, JGitText.get().cannotCreateConfig, e);
    }
  }
View Full Code Here

TOP

Related Classes of org.eclipse.jgit.errors.TransportException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.