lfs-test-server
lfs-test-server copied to clipboard
Passwordless use case?
I'd like to use this test server to setup a public repository with some lfs-server backed files that, when cloned, does not prompt the user for a user name or password to pull the lfs files (just like any old public git repository on github). Is that possible?
It would be nice if there were an environment variable that could disable authentication or something like that.
I would think this should be achievable by putting the user:pass in the lfs url like so:
[lfs]
url = "https://user:pass@localhost:8080/jimdoe/lfsrepo"
But that doesn't seem to work.
We can make the test server work without authentication, but the client side doesn't support that very well just yet. We'll need to modify the client to only ask for authorization if the server needs it.
We don't currently support user/password in the urls store in the git config, but that may change. I think it's bad form to have the credentials checked into the repo, but it has been requested before.
Yeah. It's bad form for sure. I was only trying everything I can think of to get a public server working.
I'm think the "right" way to solve the problem is to have an option in the server to disable authentication and a client that respects that. I'm not holding my breath for all those changes to be made though. I had hoped I could find a way to make a public repo today.
Don't https://github.com/github/lfs-test-server/pull/33 and https://github.com/github/git-lfs/pull/415 resolve this ?
#33 and https://github.com/github/git-lfs/pull/415 only deal with the Batch API specifically. We kept it that way in the client to avoid breaking changes with the non-batched API, with the intent that in 0.6+ the Batch API will replace the other one.
so isn't the uses:pass@server working yet? is it a feature with git-lfs or the test server? right that it may be bad practice to have the user name on the url to begin with, but you could have it only on your private config so don't expose but still quicken push/pulls.
is the user@server format at least working? anyone tried that?
On the latest client (1.2.1) and test server (0.3.0), I have
[lfs]
url = "http://user:[email protected]:port/"
in my .gitconfig, and it seems to work fine. You do, of course, have to go to lfs.example.com/mgmt and add the corresponding user first.