Problems with git/ssh repo, the go tool and proxy.golang.org

350 views
Skip to first unread message

SuperTXT Team

unread,
Mar 27, 2023, 4:32:32 PM3/27/23
to golang-nuts
Hello Everyone,

I'm maintaining an internet site that hosts Go-based tools/libraries. They're served using the git ssh protocol, not https. There is a subset of the site that works via https, so the module proxy protocol is implemented. https://pkg.go.dev/cmd/go#hdr-Module_proxy_protocol

When requested of the site the meta tag is provided with an ssh URL that is cloneable. However, when I try to "go install" a cli tool from there it fails with this error:

   go: downloading supertxt.net/git/cats v0.1.0
   go: supertxt.net/git/cats@latest: supertxt.net/git/ca...@v0.1.0: verifying module: supertxt.net/git/ca...@v0.1.0: reading https://sum.golang.org/lookup/supertxt.net/git/ca...@v0.1.0: 404 Not Found
server response:
   not found: supertxt.net/git/ca...@v0.1.0: invalid version: git ls-remote -q origin in /tmp/gopath/pkg/mod/cache/vcs/5036be04affce43ea67c463aac9d1c179b6e55c9f8d713eadbb0f442f8bbb14f: exit status 128:
fatal: transport 'ssh' not allowed

If I disable the sum function with GOSUMDB=off then this all works as expected. I notice a similar error when I try to register the module with proxy.golang.org as well, in an effort to have the package added to the pkg.go.dev site.

It appears that while the module proxy protocol supports git ssh protocol, it isn't working with the *.golang.org sites. Does anyone know if this is a known limitation, or should this be raised as a bug? I couldn't find anything in the documentation for registering a package with pkg.go.dev that says that it wouldn't work.

Thanks!
Reply all
Reply to author
Forward
0 new messages