Avatar ·

Error "terminal prompts disabled" when running go get for private GitHub repository

Hi! I'm new to Go and trying to connect a private GitHub repository to my project. I set up SSH keys, added them to the agent, and verified — `git clone git@github.com:myorg/myrepo.git` works fine without asking for a password.\n\nBut when I run `go get github.com/myorg/myrepo`, I get this error:\n\n```\ngo: github.com/myorg/myrepo@v0.0.0-xxxx: terminal prompts disabled\nUse the 'git config core.askPass' or 'GIT_ASKPASS' environment variable, or set 'SSH_AUTH_SOCK'\n```\n\nIn my `go.mod` I have `module myproject`, and I added `require github.com/myorg/myrepo v0.0.0`. Go version is 1.16, on Windows 10. I tried running with `GIT_TERMINAL_PROMPT=1` — it didn't help. In my `.gitconfig` I have the setting `[url "git@github.com:"]` with `insteadOf = https://github.com/`. But it still doesn't work. How to properly