Skip to content
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

Use same GitHub token logic as gh #153

Open
maelle opened this issue Jun 14, 2022 · 4 comments
Open

Use same GitHub token logic as gh #153

maelle opened this issue Jun 14, 2022 · 4 comments

Comments

@maelle
Copy link
Contributor

maelle commented Jun 14, 2022

or even the gh function?

Asking this as I am getting a 401.

@maelle
Copy link
Contributor Author

maelle commented Jun 14, 2022

after getting a 401 for I think an expired GITHUB_GRAPHQL_TOKEN I had in my .Renviron I ran Sys.setenv ("GITHUB_TOKEN" =gh::gh_token()) then got an error about having several tokens. I tried setting GITHUB_GRAPHQL_TOKEN to "" but it did not work so I commented it out in my .Renviron then restarted R then ran Sys.setenv ("GITHUB_TOKEN" =gh::gh_token()) then it worked.

@mpadge
Copy link
Member

mpadge commented Jun 14, 2022

Yes indeed, that should be done. The reason not is that i don't use the git credentials store, because i have my own wacky encrypted authorization system so i can push to multiple remotes with one command. But my idiosyncracies shouldn't make it more difficult for other people to use this package. I'll update my own workflow, and then get to this straight after that. Thanks!

@maelle
Copy link
Contributor Author

maelle commented Jun 14, 2022

In that case you'd just need to replace the current function with gh::gh_token().

Now I am curious about your complex workflow, sounds like a good tech note topic. 😁

@mpadge
Copy link
Member

mpadge commented Jun 14, 2022

Now I am curious about your complex workflow, sounds like a good tech note topic. grin

No, it's not, and not recommended for anybody else. It was just a fun coding exercise. Also because i like having a pasword prompt after git push. That microsecond delay and mental prompt has saved me from many silly pushes. So my git push works like old-school password-style, but is all 2FA via ssh which shouldn't need a password. It's silly, really, but i like it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants