-
Notifications
You must be signed in to change notification settings - Fork 55
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
Unable to register secret with gh command #581
Comments
What OS and what credential helper? |
I haven't set any credential helpers on Ubuntu 22.04 on the container. |
AFAIR gh just stores your token in a plain text file, and I suspect that it installs its own credential helper that does not work well with gitcreds, apparently. Btw. does command line git work with https and the token that was installed in gh? I.e. can you do What's the output of Until this is fixed in gitcreds, a workaround is indeed to set the |
Thanks, since I am working within VS Code Dev Containers, it appears that the credential helpers set up by VS Code Dev Containers are being used. $ git config credential.helper
!f() { /home/user/.vscode-server/bin/1e790d77f81672c49be070e04474901747115651/node /tmp/vscode-remote-containers-dfcfcb41-7bf4-4916-bc63-9db9c9b00bfe.js git-credential-helper $*; }; f (As a side note, I was wondering why installing packages on GitHub using It turns out that github.com:
users:
eitsupi:
oauth_token: gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
git_protocol: https
oauth_token: gho_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
user: eitsupi |
Thanks! I'll investigate how to work with those helpers. In the meanwhile, does seeing a |
Btw. what's the simplest way to spin up the dev container that you are using? |
I set with > gitcreds::gitcreds_get()
<gitcreds>
protocol: NA
host : NA
username: NA
password: <-- hidden --> In any case, it was enough for me to run the workflow manually from the GitHub.com UI, so I don't need to run it from R.
I used devcontainer.json like this: {
"image": "ghcr.io/rocker-org/devcontainer/r-ver:4"
} I believe it is the closed source VS Code Dev Container extension that set up the Git credential helper, so you probably need to create a container from VS Code. (Codespaces seems to set another credential helper) |
No, that's enough and it should work. |
I think this is strictly a bug in the
gitcreds
package, butrhub2
doesn't seem to recognize it even though I registered the secret in the GitHub CLI.This hangs:
The text was updated successfully, but these errors were encountered: