-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: Permission Denied when downloading a private module with go get #52942
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
Comments
CC @bcmills maybe? |
Show your git config and ssh setup? |
You need either an |
Duplicate of #26134 |
I don't think this is a duplicate of #26134, because I do have this in my gitconfig:
|
and what happens if you do:
|
@seankhliao That command runs successfully. It asks for my private key passphrase and the lists all the refs in the repo. I also downgraded my project go version to 1.17, which gave the same issue. However, I don't get this issue with 1.16. So it seems that the |
@arieroos , I've been fighting with a similar problem and this is what worked for me: [email protected]: Permission denied (publickey) tells you that Whilst commands like So next; I checked out why my ssh key was not used. Looking around, I found out that
I hope this helps. |
@al-villalba That worked! Thanks a million! |
https://go.dev/doc/go1.17#password-prompts
|
It's not about what method to use for authentication, ssh or https. It's about how to use ssh+key, as this method is the preferred method for corporate private repositories and often is the only one. Don't take me wrong, but if I can login to a remote machine with |
Ah! In that case, I think #49515 is probably a better fit. See specifically #49515 (comment) for details. |
Ah. I missed that when I originally read the release notes. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes. Assuming 1.18.2 is the latest release.
I tested with go1.16.5 to ensure that it wasn't a config issue on my machine, but I managed to successfully install the same module with go1.16 on the same machine.
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
I tried downloading a private module by running:
What did you expect to see?
I expected my private module to be downloaded.
What did you see instead?
I got this output:
Additional Notes
ssh -T [email protected]
works as expected.The text was updated successfully, but these errors were encountered: