summaryrefslogtreecommitdiffstats
path: root/org.eclipse.jgit.ssh.jsch
Commit message (Collapse)AuthorAgeFilesLines
* Prepare 5.11.0-SNAPSHOT buildsMatthias Sohn2020-12-023-14/+14
| | | | | Change-Id: I91e5532526775191fbd34f81e2ef777cba605e3b Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Revert "Client-side protocol V2 support for fetching"Thomas Wolf2020-11-031-21/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit f802f06e7fd5a98f256b7b7727598491f563bf2f. I had misunderstood how protocol V2 works. This implementation only works if the negotiation during fetch is done in one round. Fixing this is substantial work in BasePackFetchConnection. Basically I think I'd have to change back negotiate to the V0 version, and have a doFetch() that does if protocol V2 doFetchV2() else doFetchV0() with doFetchV0 the old code, and doFetchV2 completely new. Plus there would need to be a HTTP test case requiring several negotiation rounds. This is a couple of days work at least, and I don't know when I will have the time to revisit this. So although the rest of the code is fine I prefer to back this out completely and not leave a only half working implementation in the code for an indeterminate time. Bug: 553083 Change-Id: Icbbbb09882b3b83f9897deac4a06d5f8dc99d84e Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Client-side protocol V2 support for fetchingThomas Wolf2020-10-291-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make all transports request protocol V2 when fetching. Depending on the transport, set the GIT_PROTOCOL environment variable (file and ssh), pass the Git-Protocol header (http), or set the hidden "\0version=2\0" (git anon). We'll fall back to V0 if the server doesn't reply with a version 2 answer. A user can control which protocol the client requests via the git config protocol.version; if not set, JGit requests protocol V2 for fetching. Pushing always uses protocol V0 still. In the API, there is only a new Transport.openFetch() version that takes a collection of RefSpecs plus additional patterns to construct the Ref prefixes for the "ls-refs" command in protocol V2. If none are given, the server will still advertise all refs, even in protocol V2. BasePackConnection.readAdvertisedRefs() handles falling back to protocol V0. It newly returns true if V0 was used and the advertised refs were read, and false if V2 is used and an explicit "ls-refs" is needed. (This can't be done transparently inside readAdvertisedRefs() because a "stateless RPC" transport like TransportHttp may need to open a new connection for writing.) BasePackFetchConnection implements the changes needed for the protocol V2 "fetch" command (simplified ACK handling, delimiters, section headers). In TransportHttp, change readSmartHeaders() to also recognize the "version 2" packet line as a valid smart server indication. Adapt tests, and run all the HTTP tests not only with both HTTP connection factories (JDK and Apache HttpClient) but also with both protocol V0 and V2. Do the same for the SSH transport tests. Bug: 553083 Change-Id: Ice9866aa78020f5ca8f397cde84dc224bf5d41b4 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Merge branch 'stable-5.9' into masterMatthias Sohn2020-09-091-4/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | * stable-5.9: Prepare 5.9.1-SNAPSHOT builds JGit v5.9.0.202009080501-r [releng] Enable japicmp for the fragments added in 5.8.0 GitlinkMergeTest: fix boxing warnings Remove unused API problem filters Add missing since tag on BundleWriter#addObjectsAsIs GPG: include signer's user ID in the signature Change-Id: Iaa96f9228752540f446fc232a49f31a738fd8d30 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * Prepare 5.9.1-SNAPSHOT buildsMatthias Sohn2020-09-083-14/+14
| | | | | | | | | | Change-Id: I9006e7961111982943ffef496d15bd525959b3e4 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.9.0.202009080501-rv5.9.0.202009080501-rMatthias Sohn2020-09-083-4/+4
| | | | | | | | | | Change-Id: Ic98ae61b3f327ef72256fd9b2e28510e3a481de7 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * [releng] Enable japicmp for the fragments added in 5.8.0Thomas Wolf2020-09-071-4/+0
| | | | | | | | | | | | | | Uncomment the japicmp configurations in the pom.xmls of the fragments org.eclipse.jgit.gpg.bc and org.eclipse.jgit.ssh.jsch. Change-Id: I7c884be014cb48387f97a300043b04aeb712fbba Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
| * Prepare 5.9.0-SNAPSHOT buildsMatthias Sohn2020-08-273-4/+4
| | | | | | | | | | Change-Id: Ia3e8382ec503150979d8acb6161031ccfb7fd921 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
| * JGit v5.9.0.202008260805-m3v5.9.0.202008260805-m3Matthias Sohn2020-08-263-4/+4
| | | | | | | | | | Change-Id: Ic4de8340f3ab038e38b239b725b8bd6d6dbee413 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* | Prepare 5.10.0-SNAPSHOT buildsMatthias Sohn2020-08-273-14/+14
|/ | | | | Change-Id: I9a2b39e9e85f27179ceb3b1709d75c466089a3bc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Fix JSchProcess.waitFor() with time-outThomas Wolf2020-08-101-1/+1
| | | | | | | | | | | | | | | | SshSupport.runSshCommand() had a comment that wait with time-out could not be used because JSchProcess.exitValue() threw the wrong unchecked exception when the process was still running. Fix this and make JSchProcess.exitValue() throw the right exception, then wait with a time-out in SshSupport. The Apache sshd client's SshdExecProcess has always used the correct IllegalThreadStateException. Add tests for SshSupport.runCommand(). Change-Id: Id30893174ae8be3b9a16119674049337b0cf4381 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
* Prepare 5.9.0-SNAPSHOT buildsMatthias Sohn2020-06-093-14/+14
| | | | | Change-Id: Ia998e2772df1285a4c674b07201f15d53156eb78 Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Use version range to define fragment host bundle versionMatthias Sohn2020-06-041-1/+1
| | | | Change-Id: Ie877e976b20d3448fc1f12a1c775942d626a12fc Signed-off-by: Matthias Sohn <matthias.sohn@sap.com>
* Decouple JSch from JGit CoreMatthias Sohn2020-06-0126-0/+2558
Motivation: JSch serves as 'default' implementations of the SSH transport. If a client application does not use it then there is no need to pull in this dependency. Move the classes depending on JSch to an OSGi fragment extending the org.eclipse.jgit bundle and keep them in the same package as before since moving them to another package would break API. Defer moving them to a separate package to the next major release. Add a new feature org.eclipse.jgit.ssh.jsch feature to enable installation. With that users can now decide which of the ssh client integrations (JCraft JSch or Apache Mina SSHD) they want to install. We will remove the JCraft JSch integration in a later step due to the reasons discussed in bug 520927. Bug: 553625 Change-Id: I5979c8a9dbbe878a2e8ac0fbfde7230059d74dc2 Also-by: Michael Dardis <git@md-5.net> Signed-off-by: Michael Dardis <git@md-5.net> Signed-off-by: Matthias Sohn <matthias.sohn@sap.com> Signed-off-by: David Ostrovsky <david@ostrovsky.org>