aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/ssh/common.go
Commit message (Collapse)AuthorAgeFilesLines
* *: Replace fmt.Sprintf with net.JoinHostPortPaulo Gomes2023-05-111-2/+2
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* plumbing: transport/ssh, add support for custom proxy URLsSanskar Jaiswal2023-05-041-3/+27
| | | | Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* fix(ssh): unable to pass a custom HostKeyCallback funcAyman Bagabas2023-03-051-20/+13
| | | | | | | | Don't overwrite HostKeyCallback if one is provided. Fixes: c35b8082c863 ("plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes #411") Fixes: https://github.com/go-git/go-git/issues/654 Signed-off-by: Ayman Bagabas <ayman.bagabas@gmail.com>
* plumbing: transport/ssh, auto-populate ClientConfig.HostKeyAlgorithms. Fixes ↵Evan Elias2022-09-221-1/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | #411 This commit adjusts the transport/ssh logic in command.connect(), so that it now auto-populates ssh.ClientConfig.HostKeyAlgorithms. The algorithms are chosen based on the known host keys for the target host, as obtained from the known_hosts file. In order to look-up the algorithms from the known_hosts file, external module github.com/skeema/knownhosts is used. This package is just a thin wrapper around golang.org/x/crypto/ssh/knownhosts, adding an extra mechanism to query the known_hosts keys, implemented in a way which avoids duplication of any golang.org/x/crypto/ssh/knownhosts logic. Because HostKeyAlgorithms vary by target host, some related logic for setting HostKeyCallback has been moved out of the various AuthMethod implementations. This was necessary because the old HostKeyCallbackHelper is not host-specific. Since known_hosts handling isn't really tied to AuthMethod anyway, it seems reasonable to separate these. Previously-exported types/methods remain in place for backwards compat, but some of them are now unused. For testing approach, see pull request. Issue #411 can only be reproduced via end-to-end / integration testing, since it requires actually launching an SSH connection, in order to see the key mismatch error triggered from https://github.com/golang/go/issues/29286 as the root cause.
* transport: ssh, fix cloning large repositories (#272)David Cuadrado2021-03-261-1/+8
| | | | | | | | | | | | | | | | | * Fix cloning large repositories Ignore the error on close when the connection is already closed Fixes #70 * Compatibility for go 1.13 Because it's required by the pipeline * Add test for allowing to close a command when the client is already closed This test is for issue #70 * Add debug information for broken test
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-101-2/+2
|
* ssh: leverage proxy.DialJacob Blain Christen2019-05-021-1/+26
| | | | | | | This enables interacting with git remotes over SSH when behind a SOCKSv5 firewall. Signed-off-by: Jacob Blain Christen <dweomer5@gmail.com>
* plumbing: transport ssh, ssh_config implementationMáximo Cuadros2017-12-111-12/+40
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* check .ssh/config for host and port overrides; fixes #629Robert Smith2017-12-091-0/+15
|
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-211-6/+1
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-211-7/+7
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, fixes override HostKeyCallback from DefaultClientMáximo Cuadros2017-11-201-3/+1
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: fix ssh override config, fixes #519v4.0.0-rc13Máximo Cuadros2017-07-281-5/+8
|
* transport/ssh: allow global *ssh.ClientConfig overrideSantiago M. Mola2017-06-231-14/+31
| | | | | A global *ssh.ClientConfig override can be set. It will be use to override values of each SSH session.
* transport/ssh: allow passing SSH optionsSantiago M. Mola2017-06-231-3/+19
| | | | | Adds the possibility of passing options to SSH transport. Options have the form of functions modifying ssh.ClientConfig.
* transport: make Endpoint an interface, fixes #362Santiago M. Mola2017-04-271-12/+9
| | | | | * add internal *url.URL implementation for regular URLs. * add internal implementation for SCP-like URLs.
* transport: ssh, new DefaultAuthBuilder variableMáximo Cuadros2017-04-211-1/+7
|
* transport: ssh, default HostKeyCallbackMáximo Cuadros2017-04-161-1/+7
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-071-2/+2
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* package plumbing documentation improvements (#248)Máximo Cuadros2017-02-071-0/+1
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-301-2/+2
|
* transport: remove SetAuth, fixes #206 (#210)Anthony Weems2017-01-171-11/+11
| | | | | * remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API.
* transport: ssh, keeping the original path (#189)Máximo Cuadros2016-12-151-4/+1
|
* transport: add local transport (#145)Santiago M. Mola2016-11-291-92/+47
| | | | | * transport: move common packp protocol out of ssh transport. * fixtures: add fixture for empty repository. * transport: add file:// transport
* plumbing/transport: add common tests and fixes. (#136)Santiago M. Mola2016-11-251-17/+35
| | | | | | | | | | | | | | | | | | | * plumbing/transport: add common tests and fixes. * add common test suite for different transport implementations. * fix different behaviour on error handling for ssh and http. fixes issue #123. * support detecting unexisting repositories with SSH + GitHub/Bitbucket (apparently, there is no standard for all SSH servers). * remove ssh.NewClient (only DefaultClient makes sense at the moment). * make ssh.Client and http.Client private. * utils/ioutil: utilities to work with io interfaces. * * transport: test actual objects fetched, not just packfile size. * * fix doc typo. * * improve UploadPackRequest.IsEmpty
* transport: create Client interface (#132)Santiago M. Mola2016-11-231-0/+151
* plumbing: move plumbing/client package to plumbing/transport. * transport: create Client interface. * A Client can instantiate any client transport service. * InstallProtocol installs a Client for a given protocol, instead of just a UploadPackService. * A Client can open a session for fetch-pack or send-pack for a specific Endpoint. * Adapt ssh and http clients to the new client interface. * updated doc