aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport
Commit message (Collapse)AuthorAgeFilesLines
* Simplify return statement in receivePackNoCheckIskander (Alex) Sharipov2018-12-121-5/+1
| | | | | | Fixes #1035 Signed-off-by: Iskander Sharipov <quasilyte@gmail.com>
* Merge branch 'master' of github.com:src-d/go-git into ↵Colton McCurdy2018-11-012-1/+58
|\ | | | | | | mccurdyc/Issue#969/fix-flaky-ssh-test
| * http: improve TokenAuth documentationSantiago M. Mola2018-10-311-1/+8
| | | | | | | | | | | | | | | | | | | | Users are often confused with TokenAuth, since it might look that it should be used with GitHub's OAuth tokens. But that is not the case. TokenAuth implements HTTP bearer authentication. Most git servers will use HTTP basic authentication (user+passwords) even for OAuth tokens. Signed-off-by: Santiago M. Mola <santi@mola.io>
| * plumbing: transport/http, Add missing host/port on redirect. Fixes #820Dave Henderson2018-10-272-0/+50
| | | | | | | | Signed-off-by: Dave Henderson <dhenderson@gmail.com>
* | plumbing: ssh, Fix flaky test TestAdvertisedReferencesNotExists. Fixes #969Colton McCurdy2018-11-011-3/+11
|/ | | | Signed-off-by: Colton McCurdy <mccurdyc22@gmail.com>
* test: improve test for urlencoded user:passSantiago M. Mola2018-09-271-5/+15
| | | | Signed-off-by: Santiago M. Mola <santi@mola.io>
* Merge pull request #949 from kuba--/custom-cacheMáximo Cuadros2018-09-082-3/+4
|\ | | | | Expose Storage cache.
| * Expose Storage cache.kuba--2018-09-072-3/+4
| | | | | | | | Signed-off-by: kuba-- <kuba@sourced.tech>
* | 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>
* *: use parser to populate non writable storages and bug fixesMiguel Molina2018-08-072-7/+6
| | | | Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
* plumbing/transport/internal: common, add support of Gogs for ↵Jerome Doucet2018-07-142-0/+83
| | | | | | ErrRepositoryNotFound, avoiding to get an 'unknown error: '. Add some tests for existing supported services (github, gitlab, etc...) too. Signed-off-by: Jerome Doucet <jerdct@gmail.com>
* plumbing/transport: http, Adds token authentication support [Fixes #858]Eric Billingsley2018-06-082-0/+38
| | | | Signed-off-by: Eric Billingsley <ebilling@babrains.com>
* Remove printlnAntonio Jesus Navarro Perez2018-06-051-1/+0
| | | | Signed-off-by: Antonio Jesus Navarro Perez <antnavper@gmail.com>
* plumbing: transport, make target repo writeable in testsJavi Fontan2018-03-271-0/+21
| | | | | | | | | Some tests write to an already existent repository retrieved from fixtures. The permissions of these files are read only and make receive pack fail. This was shadowed before as close errors were lost. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* *: Use CheckClose with named returnsJavi Fontan2018-03-271-3/+3
| | | | | | | | Previously some close errors were losts. This is specially problematic in go-git as lots of work is done here like generating indexes and moving packfiles. Signed-off-by: Javi Fontan <jfontan@gmail.com>
* Merge pull request #762 from zkry/escape-basic-auth-user-pswdMáximo Cuadros2018-03-012-2/+12
|\ | | | | plubming: transport, Escape the user and pswd for endpoint. Fixes #723
| * plubming: transport, Escape the user and password for endpoint. Fixes #723Zachary Romero2018-02-282-2/+12
| | | | | | | | Signed-off-by: Zachary Romero <zacromero3@gmail.com>
* | Merge pull request #766 from mvdan/patchesMáximo Cuadros2018-03-012-22/+11
|\ \ | | | | | | Unused params, unused code, make Go tip's vet happy
| * | all: make the upcoming Go 1.11's vet happyDaniel Martí2018-03-011-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | vet in 1.10 and earlier was buggy in how its "composite literal uses unkeyed fields" check had false negatives when it encountered a slice of pointer types that omitted each element's type. This has been fixed in tip, so adapt to that fix. Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
| * | all: remove some unused codeDaniel Martí2018-03-011-11/+0
| |/ | | | | | | Signed-off-by: Daniel Martí <mvdan@mvdan.cc>
* / 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>
* Merge pull request #751 from mcuadros/redirectMáximo Cuadros2018-02-154-10/+56
|\ | | | | transport: http, fix services redirecting only info/refs
| * transport: http, fix services redirecting only info/refsMáximo Cuadros2018-02-144-10/+56
| | | | | | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* | 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-302-2/+2
|
* plumbing/transport: Fix truncated comment in EndpointOri Rawlings2017-11-271-1/+1
|
* Close http.Body reader when neededAntonio Jesus Navarro Perez2017-11-241-1/+3
| | | | If we don't do that, all the goroutines opened by the Body Reader are never closed, causing a 'fatal: morestack on g0' error.
* update to go-billy.v4 and go-git-fixtures.v3Máximo Cuadros2017-11-2314-20/+17
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-215-55/+59
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-2122-101/+82
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: converts Endpoint interface into a structMáximo Cuadros2017-11-212-167/+195
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-202-8/+7
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-206-243/+211
| | | | 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>
* transport: http, fixes random failing test, #644Máximo Cuadros2017-11-201-60/+52
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* Fixed SCP regexJ. Fernando Sánchez2017-09-282-2/+2
| | | | URLs should be user@server:port/path instead of user@server:port:path
* Adds port to SCP EndpointsJ. Fernando Sánchez2017-09-282-3/+23
| | | | | | The port for SCP-like URLs was hardcoded to 22. This commit modifies the regex to find a port (optional), and adds a new test case that covers this scenario.
* config: support a configurable, and turn-off-able, pack.windowJeremy Stribling2017-09-112-2/+3
| | | | | | | | | | | | | | | | | | | | One use of go-git is to transfer git data from a non-standard git repo (not stored in a file system, for example) to a "remote" backed by a standard, local .git repo. In this scenario, delta compression is not needed to reduce transfer time over the "network", because there is no network. The underlying storage layer has already taken care of the data tranfer, and sending the objects to local .git storage doesn't require compression. So this PR gives the user the option to turn off compression when it isn't needed. Of course, this results in a larger, uncompressed local .git repo, but the user can then run git gc or git repack on that repo if they care about the storage costs. Turning the pack window to 0 on reduces total push time of a 36K repo by 50 seconds (out of a pre-PR total of 3m26s).
* Add sideband support for pushOri Rawlings2017-09-012-2/+29
|
* plumbing: use LookPath instead of Stat to fix Windows executablesJeremy Stribling2017-08-272-2/+2
| | | | | | When git-core isn't in the user's PATH, we need to use `LookPath` to verify the existence of the executable, rather than `os.Stat`, so that on Windows it will search for files with executable suffixes.
* Merge pull request #540 from mcarmonaa/fix/git-transport-windows-testMáximo Cuadros2017-08-101-0/+6
|\ | | | | *: windows support, skipped receive_pack_test for git transport
| * skipped receive_pack_test for git transport in windowsManuel Carmona2017-08-101-0/+6
| |
* | 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-073-1/+22
| | | | | | | | | | | | | | * 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"
* Merge pull request #527 from strib/win-pack-cmdsMáximo Cuadros2017-08-042-2/+75
|\ | | | | plumbing: fix pack commands for the file client on Windows
| * plumbing: fix pack commands for the file client on WindowsJeremy Stribling2017-08-032-2/+75
| | | | | | | | | | | | The default git install on Windows doesn't come with commands for receive-pack and upload-pack in the default $PATH. Instead, use --exec-path to find pack executables in that case.