Skip to content

tests for credentials in remote and lfs.url config - #1136

Merged
technoweenie merged 7 commits into
masterfrom
add-tests-for-including-credentials-in-remote-or-lfs-url
Apr 12, 2016
Merged

technoweenie merged 7 commits into
masterfrom
add-tests-for-including-credentials-in-remote-or-lfs-url

Conversation

@technoweenie

Copy link
Copy Markdown
Contributor

Trying to replicate #906

Replicated it with some more info. Running with GIT_TRACE=1 showed me this:

trace git-lfs: HTTP: POST https://USER:[email protected]/repo.git/info/lfs/objects/batch
trace git-lfs: HTTP: 200
trace git-lfs: HTTP: {"objects":[{"oid":"0000000000000000000000000000000000000000000000000000000000000000","size":1,"_links":{"download":{"href":"https://git-lfs-server.com/repo/info/lfs/objects/0000000000000000000000000000000000000000000000000000000000000000","header":{"Accept":"application/vnd.git-lfs"}}}}]}
trace git-lfs: HTTP:
Username for 'https://git-lfs-server.com':

The LFS client is authenticating https://USER:[email protected]/repo.git/info/lfs/objects/batch properly. However, the LFS server is not returning authenticated urls to the requested objects, like https://git-lfs-server.com/repo/info/lfs/objects/0000000000000000000000000000000000000000000000000000000000000000. This is undesirable, but should be easy enough to fix.

@technoweenie

Copy link
Copy Markdown
Contributor Author

Looks like this is hanging on Mac builds with Git < 2.3.0: https://travis-ci.org/github/git-lfs/jobs/121807396

I added a timeout to script/integration.go, which dumps partial output after a failure. Here's a sample with a really low 3s timeout. Notice how it's clear test-fetch.sh didn't do anything, while test-pre-push.sh got through 3 tests before timing out.

error: test/test-fetch.sh => Timed out
<no output for test/test-fetch.sh>
test: happy path ...                                               OK
test: clears local temp objects ...                                OK
test: ls-files ...                                                 OK
test: ls-files: outside git repository ...                         OK
test: ls-files: with zero files ...                                OK
test: ls-files: show duplicate files ...                           OK
test: ls-files: show duplicate files with long OID ...             OK
error: test/test-pre-push.sh => Timed out
test: pre-push ...                                                 OK
test: pre-push dry-run ...                                         OK
test: pre-push 307 redirects ...                                   OK

@technoweenie technoweenie mentioned this pull request Apr 11, 2016
16 of 17 tasks
@sinbad

sinbad commented Apr 12, 2016

Copy link
Copy Markdown
Contributor

👍
I tried to replicate the failure/stall at caee1d5 by building git 1.9.3 from source (I'm already using go 1.6) but it works for me on Mac, so I don't know why Travis is having an issue.

@technoweenie

Copy link
Copy Markdown
Contributor Author

Merging this. Opened #1140 so I can tackle it later.

@technoweenie
technoweenie merged commit 582cc6c into master Apr 12, 2016
@technoweenie
technoweenie deleted the add-tests-for-including-credentials-in-remote-or-lfs-url branch April 12, 2016 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants