aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport/http
Commit message (Collapse)AuthorAgeFilesLines
* plumbing: transport/http, add support for custom proxy URLsSanskar Jaiswal2023-05-047-1/+307
| | | | | | | | | | | | | | Add support for custom HTTP and HTTPS proxies for each session. The tests require server certificate and a matching private key to be able to run a TLS server and test HTTPS proxy functionality. The cert and the key are stored in `plumbing/transport/http/testdata/certs` and were generated using the following command: `openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout server.key -out server.crt` Note: All details were left empty, except for the FQDN for which example.com was used. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* plumbing: transport/http, refactor transport to cache underlying transport ↵Sanskar Jaiswal2023-05-045-13/+230
| | | | | | | | | | | | | objects Refactor the in-built http transport to cache the underlying http transport objects mapped to its specific options for each Git transport object. This lets us reuse the transport for a specific set of configurations as recommended. (ref: https://pkg.go.dev/net/http#Transport) If there are no transport specific options provided, the default transport is used. Signed-off-by: Sanskar Jaiswal <jaiswalsanskar078@gmail.com>
* plumbing: transport/http, skip flaky testMáximo Cuadros2021-05-031-0/+4
|
* plumbing: wire up contexts for Transport.AdvertisedReferences (#246)Andrew Suffield2021-03-264-4/+44
| | | | | * plumbing: wire up contexts for Transport.AdvertisedReferences * add more tests for context wiring
* fix goreportcard warningsOleg Kovalov2020-07-013-3/+3
|
* *: migration from go-git-fixtures/v4 and go-git/gcfgMáximo Cuadros2020-03-103-3/+3
|
* *: migration from gopkg to go modulesMáximo Cuadros2020-03-106-22/+22
|
* Fix typos in comments, variables and function namesOleksandr Redko2019-10-241-1/+1
| | | | Signed-off-by: Oleksandr Redko <oleksandr.red+github@gmail.com>
* Make http.AuthMethod setAuth public. Fixes #1196JACQUES Francois2019-07-282-5/+5
| | | | Signed-off-by: JACQUES Francois <Francois.JACQUES@murex.com>
* 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/transport: http, Adds token authentication support [Fixes #858]Eric Billingsley2018-06-082-0/+38
| | | | Signed-off-by: Eric Billingsley <ebilling@babrains.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>
* transport: http, fix services redirecting only info/refsMáximo Cuadros2018-02-144-10/+56
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* all: gofmt -sferhat elmas2017-11-301-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-233-5/+3
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: made public all the fields and standardize AuthMethodMáximo Cuadros2017-11-212-11/+6
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* *: add pointer to the new transport.Endpoint structMáximo Cuadros2017-11-215-18/+17
| | | | Signed-off-by: Máximo Cuadros <mcuadros@gmail.com>
* transport: git and http, full mocked testsMáximo Cuadros2017-11-203-106/+106
| | | | 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>
* Add sideband support for pushOri Rawlings2017-09-011-0/+13
|
* transport: context package supportMáximo Cuadros2017-07-252-8/+19
|
* fix auth error issueAntonio Jesus Navarro Perez2017-07-042-1/+7
|
* fix CGI git serverAntonio Jesus Navarro Perez2017-07-041-7/+14
|
* transport: http pushAntonio Jesus Navarro Perez2017-07-044-77/+253
|
* transport: make Endpoint an interface, fixes #362Santiago M. Mola2017-04-272-10/+4
| | | | | * add internal *url.URL implementation for regular URLs. * add internal implementation for SCP-like URLs.
* plumbing: transport, handle 403 in http transportChris Dostert2017-04-104-7/+12
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-075-16/+16
| | | | 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-1/+1
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-305-16/+16
|
* transport/http: fix partial request with haves. Fix #216. (#221)Antonio Navarro Perez2017-01-252-3/+6
|
* transport: remove SetAuth, fixes #206 (#210)Anthony Weems2017-01-175-31/+26
| | | | | * remove SetAuth functions, implement at NewUploadPackSession/NewReceivePackSession level. * propagate transport.Auth from Fetch/Pull/Clone options to the transport API.
* server: add git server implementation (#190)Santiago M. Mola2017-01-046-61/+62
| | | | | | | | | | | | | | | * server: add generic server implementation (transport-independent), both for git-upload-pack and git-receive-pack. * server: move internal functions to internal/common. * cli: add git-receive-pack and git-upload-pack implementations. * format/packfile: add UpdateObjectStorage function, extracted from Remote. * transport: implement tranport RPC-like, only with git-upload-pack and git-receive-pack methods. Client renamed to Transport. * storer: add storer.Storer interface. * protocol/packp: add UploadPackResponse constructor with packfile. * protocol/packp: fix UploadPackResponse encoding, add tests. * protocol/packp/capability: implement All.
* transport: add git-send-pack support to local/ssh. (#163)Santiago M. Mola2016-12-091-2/+3
| | | | | | | | | * protocol/packp: add Packfile field to ReferenceUpdateRequest. * protocol/packp: add NewReferenceUpdateRequestFromCapabilities. * NewReferenceUpdateRequestFromCapabilities can be used to create a ReferenceUpdateRequest with initial capabilities compatible with the server. * protocol/packp: fix new line handling on report status. * transport/file: test error on unexisting command.
* plumbing/transport: allow AdvertisedReferences being called multiple times. ↵Santiago M. Mola2016-12-082-5/+5
| | | | | | | | (#165) * AdvertisedReferences is now part of transport.Session. * It is allowed to be called more than once. * It is allowed to be called before and after FetchPack/SendPack. * Implementations cache its result.
* remote: sideband support (#164)Máximo Cuadros2016-12-072-31/+20
| | | | | | * remote: sideband support * changes
* protocol/packp: UploadPackResponse implementation (#161)Máximo Cuadros2016-12-061-26/+12
| | | | | | | | | | | | | | | | * plumbing/protocol: paktp avoid duplication of haves, wants and shallow * protocol/pakp: UploadPackResponse implementation * changes * changes * changes * debug * changes
* capabilities: full integration (#151)Máximo Cuadros2016-12-012-3/+8
| | | | | | | | | | | | | | | | | | * format/pktline: fix readPayloadLen err handling * protocol/pakp: UploadReq validation and creation of capabilities * protocol/pakp: AdvRef tests * protocol/pakp: capability.List.Delete * protocol: filter unsupported capabilities * remote capability negociation * transport: UploadRequest validation * requested changes
* remove old types from transport and use packp (#142)Santiago M. Mola2016-11-283-11/+65
| | | | | | | | | | * protocol: move UploadPackRequest to protocol. * UploadPackRequest is now defined as an embedding of UploadRequest and UploadHaves. * Move http encoding specific code from UploadPackRequest to transport/http. * rename UlReq to UploadRequest * packp: move AdvRefs Encoder/Decoder to Encode/Decode methods. * packp: move UploadRequest Encoder/Decoder to Encode/Decode methods. * packp: Remove transport.UploadPackInfo in favor of packp. AdvRefs.
* move: format/packp -> protocol/packp (#141)Santiago M. Mola2016-11-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | * move: format/packp -> protocol/packp * format/packp -> protocol/packp * format/packp/pktline -> format/pktline. * move: protocol/packp/ulreq/* -> protocol/packp/* * protocol/packp: rename UlReq types to make them unique. * * protocol/packp: namespace UlReq encoder. * protocol/packp: namespace UlReq decoder. * protocol/packp: fix example names * move: protocol/packp/advrefs/* -> protocol/packp/* * further ulreq namespacing * protocol/packp: namespace AdvRefs types.
* plumbing/transport: add common tests and fixes. (#136)Santiago M. Mola2016-11-254-131/+65
| | | | | | | | | | | | | | | | | | | * 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-235-0/+550
* 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