-
Notifications
You must be signed in to change notification settings - Fork 11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ship our own credential helper on Linux #47
Comments
Well, gh does implement a very simple credential helper that just stores the tokens in the gh config files, in plain text:
So this is not any better than the built in "store" credential helper that stores the tokens in We could certainly have something like this in gitcreds, but it seems questionable to introduce yet another plain text file with credentials.... we could store it the same place as gh, though. |
Just expressing interest in this feature! We have seen a number of folks struggle when transitioning from RStudio Desktop to Posit Workbench or RStudio Server as they are relying on guidance from Happy Git with R or the underlying |
@jthomasmock As AFAIK there is no way to store credentials in Workbench currently (but FIXME), I think we cannot do better than the built-in 'store' credential helper, which just writes the credentials to plain text files. But then maybe we could help the user set that up, with documentation and possibly a helper function? |
I honestly think that writing to the https://happygitwithr.com/https-pat.html?q=renviron#pat-doesnt-persist-on-linux IE have
|
A proper credential helper has many advantages over storing credentials in The other main advantage is that if we use a credential helper, then command line git, (and every other tool that uses the credentials store, like the github cli, etc.) will be able to use that. |
I just tried calling system("git config --global credential.helper store") on colorado, and it seems to work well. What's somewhat surprising to me is that different sessions share the same home directory, so you'll get one set of credentials across all sessions. I guess that is a feature. So I think that we would need to update our advice in usethis and in gitcreds as well, probably, to say that people should set up the 'store' credential helper. |
Thanks for looking into this Gabor!
Yes, we persist information into the user's directory in NFS, so that users can safely resume or work on various projects over time. If I recall correctly, @leesahanders and @Rikagx were facing an issue with persisting the config, and after referencing this blogpost they ended up trying:
Lisa or Rika, was that able to persist the behavior for both the shell and RStudio? |
@jthomasmock Happy to confirm that using Unfortunately the downside to this method is that the file isn't saved with any encryption, which could be a problem for enterprise customers with security requirements. Would love thoughts for any other options that could be explored! The blog post mentioned by @jthomasmock suggested libsecret and gcm core, possibly worth considering recommending as part of the Workbench installation? |
Yeah, that blog post is geared towards a desktop Linux I think. The cache helper is not great for workbench because it stores the credentials "in" a background process, so if the session is paused then I think that process dies. Setting a longer timeout does not help with this. So we are left with the store credential helper. |
Which isn't WORSE than |
Why do you actually think it is worse than |
Re libsecret, we cannot use that in workbench, in practice it requires a GUI, and it is very hard, possibly impossible to make it work at the command line. |
Apologies for the double negative. I think that |
Apologies for not being able to read. 🙈 |
Hello! Stumbled on this after starting with a fresh install of ubuntu. What about git-credential-libsecret e.g. https://gist.github.com/maelvls/79d49740ce9208c26d6a1b10b0d95b5e ?
|
@tanho63 libsecret only works on desktop Linux with a GUI, in practice, unfortunately. |
From r-hub/rhub#581 Due to this, if we register our own commands, something like |
This is tricky for many reasons:
The text was updated successfully, but these errors were encountered: