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

cmd/go: parallel repo retrieval leads to parallel terminal prompts #49585

Closed
ckcr4lyf opened this issue Nov 15, 2021 · 1 comment
Closed

cmd/go: parallel repo retrieval leads to parallel terminal prompts #49585

ckcr4lyf opened this issue Nov 15, 2021 · 1 comment

Comments

@ckcr4lyf
Copy link

Following the issue of Go disabling terminal prompts (see #49515), I used an explicit env var to get around the problem so I can use Yubikey SSH for private repos.

However, today I ran into another problem, when go getting two private repos.

It seems go is fetching them in parallel, and as a result, it puts up both prompts at once. I can enter the first prompt with no characters showing up in the terminal, but after that there seems to be another input, which shows characters.

What I've tried (as inputs)

  • Entering correct pin, once "hidden", and once "visible"
  • Entering correct pin when "hidden", ABCDEF when "visible" (see below)
go get -u ./...
Enter PIN for 'PIV Card Holder pin (PIV_II)': Enter PIN for 'PIV Card Holder pin (PIV_II)': 
ABCDEF

go get: module gitlab.com/[redacted_same_path]/[module_one]: git ls-remote -q origin in /home/raghu/go/pkg/mod/cache/vcs/[redacted]: exit status 128:
	C_Login failed: 164
	sign_and_send_pubkey: signing failed: error in libcrypto
	no such identity: /home/raghu/.ssh/id_ecdsa: No such file or directory
	no such identity: /home/raghu/.ssh/id_ed25519: No such file or directory
	git@gitlab.com: Permission denied (publickey,keyboard-interactive).
	fatal: Could not read from remote repository.
	
	Please make sure you have the correct access rights
	and the repository exists.
go get: module gitlab.com/[redacted_same_path]/[module_two]: git ls-remote -q origin in /home/raghu/go/pkg/mod/cache/vcs/[redacted]: exit status 128:
	C_Login failed: 164
	sign_and_send_pubkey: signing failed: error in libcrypto
	no such identity: /home/raghu/.ssh/id_ecdsa: No such file or directory
	no such identity: /home/raghu/.ssh/id_ed25519: No such file or directory
	git@gitlab.com: Permission denied (publickey,keyboard-interactive).
	fatal: Could not read from remote repository.
	
	Please make sure you have the correct access rights
	and the repository exists.

This seems to be happening for go get only, since in my previous issue, I had tried go mod vendor, which would prompt me "one by one", so that I could enter my pin "hidden" all 3 times and it worked as expected.

I am not sure how this could be fixed, perhaps introduce a flag to allow fetching (maybe just private) repositories in serial?

@bcmills
Copy link
Contributor

bcmills commented Nov 15, 2021

This is one of the reasons we disable terminal prompts by default. 😅

I don't think fetching repositories sequentially is worth the configuration complexity. Let's continue the discussion of YubiKey support on #49515, and we can reconsider if that doesn't turn up any viable options.

@bcmills bcmills closed this as completed Nov 15, 2021
@golang golang locked and limited conversation to collaborators Nov 15, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants