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

pak::pak() hangs on VS Code Dev Container #633

Open
eitsupi opened this issue May 14, 2024 · 3 comments
Open

pak::pak() hangs on VS Code Dev Container #633

eitsupi opened this issue May 14, 2024 · 3 comments

Comments

@eitsupi
Copy link

eitsupi commented May 14, 2024

Maybe same as r-hub/rhub#581

VS Code Dev Containers automatically registers the following gitconfig in the container,
and pak::pak() always seems to hang. (I think it used to hang when installing packages on GitHub, but now it seems to hang reliably)

[user]
        email = xxxx@xxxx
        name = xxx
[init]
        defaultBranch = main
[core]
        editor = code --wait
        symlinks = true
[pull]
        rebase = false
[credential]
        helper = "!f() { /home/username/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node /tmp/vscode-remote-containers-5ac35a23-84dd-4701-b9b3-42dfea138948.js git-credential-helper $*; }; f"

If the credential helper is an unexpected command, can we skip it so it doesn't run?

@gaborcsardi
Copy link
Member

gaborcsardi commented May 14, 2024

I guess we can have some heuristics to skip a credential helper.

But can you try to run it manually to see what happens? E.g. can you run this (or whatever is in the config)?

/home/username/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node /tmp/vscode-remote-containers-5ac35a23-84dd-4701-b9b3-42dfea138948.js git-credential-helper

Also, can you run this from a shell?

git credential fill
url=https://github.com

You need to type in the second line after while git is waiting for input, and then press ENTER twice. Does that print your token?

@eitsupi
Copy link
Author

eitsupi commented May 14, 2024

But can you try to run it manually to see what happens? E.g. can you run this (or whatever is in the config)?

/home/username/.vscode-server/bin/dc96b837cf6bb4af9cd736aa3af08cf8279f7685/node /tmp/vscode-remote-containers-5ac35a23-84dd-4701-b9b3-42dfea138948.js git-credential-helper

Also, can you run this from a shell?

git credential fill
url=https://github.com

You need to type in the second line after while git is waiting for input, and then press ENTER twice. Does that print your token?

In both cases it hangs and does not respond to anything.

In addition, I suspect that in my environment I usually communicates to GitHub over ssh using a key shared by ssh-agent, and that this script does nothing in effect.

If I ran the same container on a computer that did not have ssh-agent set up, I would have seen a screen prompting me to log in at GitHub using HTTPS.

@eitsupi
Copy link
Author

eitsupi commented May 19, 2024

Maybe this is helpful.
microsoft/vscode-remote-release#9466 (comment)

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