aboutsummaryrefslogtreecommitdiffstats
path: root/plumbing/transport
Commit message (Collapse)AuthorAgeFilesLines
...
* plumbing: transport git fix test on windowsMáximo Cuadros2017-07-181-1/+3
|
* plumbing: server, fix loader in windowsMáximo Cuadros2017-07-181-1/+4
|
* Merge pull request #476 from smola/server-as-clientMáximo Cuadros2017-07-113-7/+49
|\ | | | | transport/server: add asClient parameter
| * transport/server: add NewClientSantiago M. Mola2017-07-113-7/+49
| | | | | | | | | | | | server.NewClient returns a server that acts as a client. This makes it working seamlessly when registering a server directly with `client.InstallProtocol`.
* | improve delete support on pushSantiago M. Mola2017-07-113-37/+16
|/ | | | | | | | | | | | | | | | | | | | | | | * server: implement delete-refs and announce it. * remote: check if server announced delete-refs before trying to delete and fail fast if it does not. Note that the client does not need no send 'delete-refs' back to the server to be able to delete references: ``` delete-refs ----------- If the server sends back the 'delete-refs' capability, it means that it is capable of accepting a zero-id value as the target value of a reference update. It is not sent back by the client, it simply informs the client that it can be sent zero-id values to delete references. ``` So our server implementation does not check if the client sent delete-refs back, it just accepts deletes if it receives them.
* transport/file: avoid race with Command.Wait, fixes #463Santiago M. Mola2017-07-071-4/+14
| | | | | | Pipe returned by Command.StderrPipe() has a race with Read and Command.Wait(). We use a io.Pipe() instead and ensure it is closed after Wait().
* transport/internal: read only first error lineSantiago M. Mola2017-07-071-17/+17
| | | | | | | We only use the first line of error output. So we use a channel with a single byte buffer and read the first line from stderr. Further output is discarded, as well as any further I/O error, which might be expected when closing the pipe (command finished).
* Merge pull request #423 from smola/ssh-optionsMáximo Cuadros2017-07-051-3/+36
|\ | | | | transport/ssh: allow passing SSH options
| * 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.
* | 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
|/
* *: upgrade to go-billy.v3, mergeMáximo Cuadros2017-06-186-26/+25
|
* transport/internal: remove Wait function, use Close directlySantiago M. Mola2017-06-134-32/+19
|
* fix ReceivePackSuite.TestSendPackAddDeleteReferenceSantiago M. Mola2017-06-131-2/+4
|
* plumbing/transport: detect "access denied error"Santiago M. Mola2017-06-131-5/+10
| | | | | | | "ERR access denied or repository not exported:" is now detected as transport.ErrRepositoryNotFound, since that's what git-daemon returns when --informative-errors is not used.
* transport/git: add git-receive-pack testsSantiago M. Mola2017-06-131-0/+140
|
* plumbing/transport: detect git protocol "no such repository" errorSantiago M. Mola2017-06-131-0/+5
|
* transport/git: ensure port is added to host parameterSantiago M. Mola2017-06-131-1/+6
|
* ensure receive-pack session is closed on push.Santiago M. Mola2017-06-131-1/+5
| | | | | | * at low level, ReceivePack must close its stream to the server to signal it has finished. * remote.go: Close() must be called on session.
* Use xanzy/ssh-agent to create the ssh agent correctly based on os.Ethan Young2017-06-012-14/+15
|
* transport/server: use Endpoint string representation as a map key.Antonio Jesus Navarro Perez2017-05-163-4/+20
| | | | Two endpoints are not equals between them, even if they were generated using the same url or path.
* do not convert local paths to URLSantiago M. Mola2017-04-287-25/+91
| | | | | | | * Do not convert local paths to URLs, just keep them as they are. * This way we add support for Windows without taking care of Windows path-to-URL conversion.
* transport: make Endpoint an interface, fixes #362Santiago M. Mola2017-04-2710-60/+199
| | | | | * 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
|
* plumbing: transport, handle 403 in http transportChris Dostert2017-04-105-8/+14
|
* use go-billy.v2 versionAntonio Jesus Navarro Perez2017-03-101-2/+2
|
* project: move imports from srcd.works to gopkg.inAntonio Jesus Navarro Perez2017-03-0729-90/+90
| | | | To be able to fix #261 we will move again to gopkg.in before v4 stable release.
* Merge pull request #294 from ajnavarro/improvement/todos-documentationSantiago M. Mola2017-03-012-6/+6
|\ | | | | Remove TODOs from documentation
| * Remove TODOs from documentationAntonio Jesus Navarro Perez2017-02-282-6/+6
| |
* | plumbing/revlist: input as a slice of hashes instead of commitsAntonio Jesus Navarro Perez2017-02-272-22/+2
|/ | | | | | | - Now the input of the method Objects inside revlist package is a slice of hashes instead of commits. Hashes can be from Blobs, Trees and Commits objects. - ObjectStorer now is used to obtain the object content using hashes slice. - This PR fix #222. Now a test into upload_pack_test.go file is not skipped anymore. - Remove code from remote.go and server.go that is not necessary.
* Merge pull request #282 from mcuadros/ssh-agent-fixMáximo Cuadros2017-02-212-3/+26
|\ | | | | plumbing/transport: git, error on empty SSH_AUTH_SOCK
| * plumbing/transport: git, error on empty SSH_AUTH_SOCKMáximo Cuadros2017-02-212-3/+26
| |
* | plumbing/transport: client avoid panics on nil protocolMáximo Cuadros2017-02-212-16/+26
|/
* transport/file: fix race condition on test (#267)Alberto Cortés2017-02-151-45/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes, the `TestClone` and `TestPush` tests of `transport/file` fail in travis. This is due to a race condition caused by an incorrect usage of `Cmd.Wait()` while reading from the output and error pipes of the command. This patch fixes the problem by using `Cmd.CombinedOutput()` instead of calling `Cmd.Start()` and `Cmd.Wait()` while reading from the output and error pipes. Details: From the `exec` package documentation: ``` Wait will close the pipe after seeing the command exit, so most callers need not close the pipe themselves; however, an implication is that it is incorrect to call Wait before all reads from the pipe have completed. For the same reason, it is incorrect to call Run when using StdoutPipe. ``` In our tests, the old `execAndGetOutput` function was creating two gorutines to read from the stderr and stdout pipes of the command and then call `Wait` on the command. This caused a race condition: when the `Wait` call finished before the gorutines have read from the pipes, they returned caused an error on `outErr`. The problem only happens sometimes on travis. To reproduce the problem locally, just add a call to time.Sleep(time.Second) to the gorutine before its `ioutil.ReadAll` call to delay them, then `Wait` will always finish before them, closing the pipes, and the gorutines will fail. The returned error detected by the test will be: ``` FAIL: server_test.go:55: ServerSuite.TestClone server_test.go:65: c.Assert(err, IsNil, Commentf("STDOUT:\n%s\nSTDERR:\n%s\n", stdout, stderr)) ... value *os.PathError = &os.PathError{Op:"read", Path:"|0", Err:0x9} ("read |0: bad file descriptor") ... STDOUT: STDERR: ```
* transport/file: delete suite tmp dir at teardown (#266)Alberto Cortés2017-02-131-5/+12
| | | | | | | | | | | The transport/file common suite test generates a temporal directory; It is used to store the go-git client command and some links to it: git-upload-pack and git-receive-pack. This directory is not deleted at the test teardown, so every time we run a test, we pollute "/tmp". This patch adds a teardown function for the suite that deletes the temporal directory. It also calls the teardown of the embedded fixtures.Suite, which is probably what we want also. I have also simplify the call to ioutil.TempDir as it already uses the default tmp dir if no dir is provided.
* package plumbing documentation improvements (#248)Máximo Cuadros2017-02-075-1/+6
|
* documentation changesMáximo Cuadros2017-01-311-1/+1
|
* new srcd.works/go-git.v4 pathMáximo Cuadros2017-01-3029-89/+89
|
* new git fixture pathMáximo Cuadros2017-01-307-7/+7
|
* rename billy importsMáximo Cuadros2017-01-301-2/+2
|
* transport/http: fix partial request with haves. Fix #216. (#221)Antonio Navarro Perez2017-01-255-4/+27
|