-
Notifications
You must be signed in to change notification settings - Fork 17.5k
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: downloading dependencies stuck when git tag signature is enable with an interactive editor #63758
Comments
Workaround for golang/go#63758
Do you have other git config that interacts with the git tag command? |
The only one I have that affects git tag is My config:
|
I'm wondering why I think it's coming from here: It seems to me that if we know that the server has a tag ref, we should just fetch the server's refs instead of trying to recreate the tag ourselves, so that we don't (say) create a plain tag for what is an annotated tag upstream. |
@Fryuni, want to send a CL with that approach? (https://go.dev/doc/contribute) I expect that the only tricky part will be writing a regression test — see |
I'll try it. Look out for the smoke in case something goes wrong 😄 |
Hey @Fryuni, Have you started working on this or can I help? |
I haven't started anything on this. Its on my queue for Thursday (holiday here), but feel free to tackle it if you are interested :) |
@Fryuni Could you please provide me with a minimal reproducible example? |
On my machine it happens for any project that has a dependency to download. If everything is already downloaded it works. I can pick any lib and version tag not in my cache and do this to reproduce: package main
import _ "github.com/some/lib"
func main() {}
This issue is not happening for @seankhliao, who also have the same editor configured, so clearly there is some difference in my system that I'm unaware of. |
I'm trying to write a test that fails when The most promising idea so far was to set the env var It is also not very portable. |
That one is fortunately much easier to deal with: you can always |
Huh. When I test locally,
Maybe there is something else in your Or, maybe it is trying to use a signing key by default, and the prompt is actually for the signing key password rather than an annotation message? |
I posted my full config up above. When I run
My GPG key doesn't require a password, but even if I disable |
Sorry, you are partially right @bcmills. The This is right at the top of the docs:
So the problem is when the environment is interactive and the git config is set to sign tags. |
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
My terminal has
EDITOR=nvim
set.go mod download
gets stuck once it callsgit tag
and git opens NeoVim in the background.The solution was to do
EDITOR= go mod download
. Maybe theEDITOR
variable should be cleared when callinggit
.What did you expect to see?
The command should complete
What did you see instead?
Nothing, the program is stuck. Inspecting the process tree, I see this:
The text was updated successfully, but these errors were encountered: