-
Notifications
You must be signed in to change notification settings - Fork 285
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
Update github_token.R to point Linux users to article #1875
Conversation
`usethis::create_github_token()` returns code for calling `gitcreds::gitcreds_set()` to set credentials. This may not (does not?) work as a user would likely expect on Linux systems, as documented in the Managing Git(Hub) Credentials article as well as various issues. However, `gitcreds::gitcreds_set()` does not give any such indication, and I think a simple addition to the `create_github_token()` output would be valuable git can be overwhelming, silent errors are extra challenging, the straightforward "Call `gitcreds::gitcreds_set() to register this token" sounds authoritative (leading to extra confusion when things don't work as expected), and {usethis} is such an excellent resource for getting people up and running with git. Thus, explicitly telling Linux users that they may need to reference additional documentation would likely be valuable thanks for considering!
Can you fill in a few more details to make sure I follow/remember?
By "does not work", I assume you don't get an error. But you're finding that the credential is not persistent? I can't remember what the exact experience is. And by linking to the article, I assume you're talking about the "store the PAT in I feel like the git credential situation has recently gotten better on linux, i.e. there is a new-ish practical option for getting the same persistence that macOS and Windows users have. So that might also be worth doing a bit of research on. |
I think I am thinking of Git Credential Manager: Now, of course, the exact flow they describe there isn't a drop-in substitute for us, because we really need the PAT for GitHub API work. But I suspect there's a way to use GCM that does suit our purposes. |
Hi Jenny! Thank you so much for looking into this.
Yes, that was exactly my experience (no error but not persisting). Apologies, I was attempting to avoid dumping too many words in the little PR but I didn't mean to leave out useful details! FYI, you are talking with someone who understands git only superficially, and I rely heavily on {usethis} for both my own use and for proselytizing when trying to convert colleagues to version control. I can't speak deeply to any of this. I got to my (mis?)understanding about not being able to use the git credential store method (rather than PAT in Is there a way to get gitcreds working on RStudio server (linux)?
And then the {usethis} article on git credentials:
New suggestion Given that GCM is both possible and rapidly evolving (thank you for sharing — I passed those details about GCM on Linux on to the engineer who manages our server), would it be possible to either check that Thank you for considering! |
Picking this back up after a long hiatus. Relevant thread in gitcreds that Linux users may want to follow: I'm just going to do something minimal here in usethis, tweaking this PR, presumably. |
usethis::create_github_token()
returns code for callinggitcreds::gitcreds_set()
to set credentials. This may not (does not?) work as a user would likely expect on Linux systems, as documented in the Managing Git(Hub) Credentials article as well as various issues. However,gitcreds::gitcreds_set()
does not give any such indication, and I think a simple addition to thecreate_github_token()
output would be valuablegit can be overwhelming, silent errors are extra challenging, the straightforward "Call `gitcreds::gitcreds_set() to register this token" sounds authoritative (leading to extra confusion when things don't work as expected), and {usethis} is such an excellent resource for getting people up and running with git. Thus, explicitly telling Linux users that they may need to reference additional documentation would likely be valuable
thanks for considering!