private git server, use google auth?

104 views Asked by At

Thought this would have been answered long ago, but couldn't find one.

Private git repo currently using ssh keys for access. I'm wondering what is involved in making it use google oauth keys. Users are already using oauth keys for redmine access.

1

There are 1 answers

0
bk2204 On

Git currently only knows how to use Basic authentication for tokens, and it doesn't know how to perform any sort of automatic token refresh or update. It is possible to use a custom credential helper to address the latter if you want, but the changing the former is not presently possible.

Some people do use http.extraheader for using e.g. Bearer authentication, but this is insecure because it stores tokens in plaintext and can break things like Git LFS, so it shouldn't be used for this purpose. I intend on submitting a patch to Git in the future to make it scream very loudly when people do this, and eventually remove the ability to specify credentials using that option altogether.

If you can operate within the limitations that Git currently provides, then you can use any sort of authentication you'd like using any sort of token mechanism. Note that Git also supports GSSAPI for Kerberos if you'd like to use an automatic, secure single sign-on technique other than a token-based one.