-
Notifications
You must be signed in to change notification settings - Fork 18k
cmd/go: get can't auth via ssh for private repo on non-standard port #70026
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
|
This does not help and not changing the output of |
you also need ssh config |
Unlike many projects, the Go project does not use GitHub Issues for general discussion or asking questions. GitHub Issues are used for tracking bugs and proposals only. For questions please refer to https://github.com/golang/go/wiki/Questions |
@seankhliao, I think the key is in ssh config, it was added via ssh-add. So it may be a bug.
|
Well, that was happening because there was two servers on my machine and git was looking on 22 which is tty, and not gitlab ssh server ._. So I need to specify the port manually:
|
Go version
go version go1.23.1 linux/amd64
Output of
go env
in your module/workspace:What did you do?
Add ssh key to gitlab and check ssh server address:
Add a new
~/.gitconfig
entry:Export
GOPRIVATE
in~/.zshrc
(also could exportGONOSUMDB
andGONOPROXY
, but not necessary).Trying to get package:
What did you see happen?
What did you expect to see?
Working download.
The key is 100% right, I've rechecked it several times.
It should work because gamedev is userspace, not the subgroup.
I guess its related with ssh server is being on
2224
port and not22
, because it worked on a different gitlab instance with a standard port. I think:
ininsteadof
config should be able to use any port? Also, adding:2224
in exported variables and~/.gitconfig
does not help so I don't know what else can I try to make it work.Related:
#36666
#26232
The text was updated successfully, but these errors were encountered: