mlem icon indicating copy to clipboard operation
mlem copied to clipboard

Support more options to authenticate on GitHub

Open aguschin opened this issue 4 years ago • 5 comments

Right now we only support authentication in GH with GITHUB_USERNAME and GITHUB_TOKEN pair provided as env vars. We should support other methods too. By authentication I mean ability to load models from private repos, list them and do other things, e.g.

mlem ls -r https://github.com/iterative/example-mlem

aguschin avatar Oct 22 '21 10:10 aguschin

This is something that will interfere with normal usage of the tool when users do their first steps, so I would consider this between p1 and p2.

aguschin avatar Nov 23 '21 13:11 aguschin

Authentication is required only for private repos, which is not very common for testing new tools, so my guess it's p2. As for auth methods, here are some options:

  • Use ssh (which is pre-authenticated most of the time) as a fallback if http request raised 404. This probably will require to clone everything to a tmp directory. This can be handled by https://github.com/iterative/scmrepo
  • Urls like https://user:[email protected]/... - this should be supported by fsspec, but I have my doubts about it. Need to check

mike0sv avatar Dec 08 '21 15:12 mike0sv

Tested a bit, git auth is not the same as ssh. Meaning, if you can run git clone ... successfully (because you already have credentials in your keychain, for example), it doesnt mean that ssh access (ssh://[email protected]/org/repo) will succeed. So the first bullet is about re-using git credentials

mike0sv avatar Dec 08 '21 15:12 mike0sv

https://github.com/iterative/scmrepo/issues/9

mike0sv avatar Dec 08 '21 15:12 mike0sv

related to #616 , or even duplicate

aguschin avatar Mar 14 '23 14:03 aguschin