aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/ssh
Commit message (Collapse)AuthorAgeFilesLines
* plumbing: check setAuth error. Fixes #185nodivbyzero2023-12-132-1/+26
|
* plumbing: transport/ssh, Fix nil pointer dereference caused when an ↵Anand Francis Joseph2023-11-022-5/+27
| | | | | | unreachable proxy server is set. Fixes #900 Signed-off-by: Anand Francis Joseph <anjoseph@redhat.com>
* *: Replace fmt.Sprintf with net.JoinHostPortPaulo Gomes2023-05-111-2/+2
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* *: Remove use of deprecated io/utilPaulo Gomes2023-05-114-8/+4
| | | | Signed-off-by: Paulo Gomes <pjbgf@linux.com>
* plumbing: transport/ssh, add support for custom proxy URLsSanskar Jaiswal2023-05-045-14/+287
| | | | Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* fix(ssh): unable to pass a custom HostKeyCallback funcAyman Bagabas2023-03-054-43/+101
| | | | | | | | 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-222-17/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | #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.
* all: replace go-homedir with os.UserHomeDirDaniel Martí2022-05-291-5/+6
| | | | Added in Go 1.12, this means we need one less dependency.
* Remove unused variables/types/functionsAbhinav Gupta2021-11-271-2/+1
| | | | | | | | [staticcheck](https://staticcheck.io/) reported a number of unused fields, functions, types, and variables across the code. Where possible, use them (assert unchecked errors in tests, for example) and otherwise remove them.
* *: use go-billy instead of os callsMáximo Cuadros2021-05-023-7/+26
|
* plumbing: transport/ssh, support more formats in `NewPublicKeys` SSH helper ↵Hidde Beydals2021-04-172-18/+11
| | | | | | | | | | | | | | | (#298) * Add failing ED25519 encrypted PEM test Signed-off-by: Hidde Beydals <hello@hidde.co> * Support more formats in `NewPublicKeys` SSH helper By switching to `ParsePrivateKey` and `ParsePrivateKeyWithPassphrase` from `crypto/ssh`, which has support for RSA (PKCS#1), PKCS#8, DSA (OpenSSL), and ECDSA private keys. Signed-off-by: Hidde Beydals <hello@hidde.co>
* plumbing: transport/ssh, fix no agent test on windowsv5.3.0Máximo Cuadros2021-03-291-1/+1
|
* transport: ssh, fix cloning large repositories (#272)David Cuadrado2021-03-262-1/+29
| | | | | | | | | | | | | | | | | * 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
* fix goreportcard warningsOleg Kovalov2020-07-011-3/+2
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-101-3/+1
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-104-6/+6
|
* *: avoid unnecessary conversionsChristian Muehlhaeuser2019-07-291-1/+1
| | | | | | | No need to convert these values, they're already of the right type. Signed-off-by: Christian Muehlhaeuser <muesli@gmail.com> (cherry picked from commit a1d8a7ac8bd0e4aff0f27dbb8bb37b8bd13a1346)
* ssh: leverage proxy.DialJacob Blain Christen2019-05-022-1/+62
| | | | | | | This enables interacting with git remotes over SSH when behind a SOCKSv5 firewall. Signed-off-by: Jacob Blain Christen <dweomer5@gmail.com>
* plumbing: ssh, Fix flaky test TestAdvertisedReferencesNotExists. Fixes #969Colton McCurdy2018-11-011-3/+11
| | | | Signed-off-by: Colton McCurdy <mccurdyc22@gmail.com>
* plumbing/transport: ssh check if list of known_hosts files is emptyKuba Podgórski2018-09-072-7/+69
| | | Signed-off-by: kuba-- <kuba@sourced.tech>
* Return error when creating public keys from invalid PEMMark DeLillo2018-02-252-0/+9
| | | | | | * pem.Decode will return nil in this case, and passing that to x509.IsEncryptedBlock will cause it to panic Signed-off-by: Mark DeLillo <github.med@delillo.org>
* Fix mistypingDmitry Labutin2018-02-071-2/+2
| | | | Signed-off-by: Dmitry Labutin <dmitry@labutin.com>
* gofmt -sMáximo Cuadros2018-01-251-2/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* plumbing: transport ssh, ssh_config implementationMáximo Cuadros2017-12-112-12/+107
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* check .ssh/config for host and port overrides; fixes #629Robert Smith2017-12-091-0/+15
|
* all: gofmt -sferhat elmas2017-11-301-1/+1
|
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-231-1/+1
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-213-44/+53
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-212-9/+9
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, mocked SSH server, fixes #332Máximo Cuadros2017-11-201-16/+108
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: ssh, fixes override HostKeyCallback from DefaultClientMáximo Cuadros2017-11-202-4/+2
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Avoid using user.Current()Kim, Hirokuni2017-08-081-6/+20
| | | | | user.Current() causes 'Current not implemented' error when crosscompiled. See https://github.com/golang/go/issues/6376
* *: windows support, some more fixes (2) (#536)Manuel Carmona2017-08-071-1/+1
| | | | | | | | | | | | | | * fixed windows failed test: "143 FAIL: worktree_test.go:314: WorktreeSuite.TestFilenameNormalization" * fixed windows failed test: "489: FAIL: auth_method_test.go:106: SuiteCommon.TestNewSSHAgentAuthNoAgent" * fixed windows failed test: "279 FAIL: server_test.go:50: ServerSuite.TestClone" fixed windows failed test: "298 FAIL: server_test.go:37: ServerSuite.TestPush" * fixed windows failed test: "316 FAIL: <autogenerated>:26: UploadPackSuite.TearDownSuite" * fixed windows failed test: "FAIL: <autogenerated>:6: IndexSuite.TearDownSuite"
* transport: fix ssh override config, fixes #519v4.0.0-rc13Máximo Cuadros2017-07-282-5/+40
|
* 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.
* Use xanzy/ssh-agent to create the ssh agent correctly based on os.Ethan Young2017-06-012-14/+15
|
* transport: make Endpoint an interface, fixes #362Santiago M. Mola2017-04-272-16/+18
| | | | | * add internal *url.URL implementation for regular URLs. * add internal implementation for SCP-like URLs.
* plumbing: transport, ssh fix public key builderMáximo Cuadros2017-04-261-1/+1
|
* Merge pull request #356 from mcuadros/ssh-default-authMáximo Cuadros2017-04-262-5/+22
|\ | | | | transport: ssh, new DefaultAuthBuilder variable
| * transport: ssh, travis testsMáximo Cuadros2017-04-211-4/+15
| |
| * transport: ssh, new DefaultAuthBuilder variableMáximo Cuadros2017-04-211-1/+7
| |
* | transport: ssh, NewPublicKeys support for encrypted PEM filesMáximo Cuadros2017-04-212-9/+35
|/
* transport: ssh, NewPublicKeys helperMáximo Cuadros2017-04-212-23/+68
|
* transport: ssh, fork knownhosts package (temporal)Máximo Cuadros2017-04-171-1/+1
|
* transport: ssh, default HostKeyCallbackMáximo Cuadros2017-04-163-2/+93
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-072-4/+4
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* plumbing/transport: git, error on empty SSH_AUTH_SOCKMáximo Cuadros2017-02-212-3/+26
|
* package plumbing documentation improvements (#248)Máximo Cuadros2017-02-071-0/+1
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-302-4/+4
|