lfs-test-server icon indicating copy to clipboard operation
lfs-test-server copied to clipboard

Passwordless use case?

Open l3iggs opened this issue 10 years ago • 8 comments

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.

l3iggs avatar May 28 '15 07:05 l3iggs

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.

l3iggs avatar May 28 '15 07:05 l3iggs

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.

rubyist avatar May 28 '15 20:05 rubyist

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.

l3iggs avatar May 28 '15 21:05 l3iggs

Don't https://github.com/github/lfs-test-server/pull/33 and https://github.com/github/git-lfs/pull/415 resolve this ?

Yopai avatar Aug 15 '15 07:08 Yopai

#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.

rubyist avatar Aug 17 '15 18:08 rubyist

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.

Gfurst avatar Feb 05 '16 13:02 Gfurst

is the user@server format at least working? anyone tried that?

Gfurst avatar Feb 15 '16 01:02 Gfurst

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.

jjlin avatar Jun 23 '16 20:06 jjlin