govpp icon indicating copy to clipboard operation
govpp copied to clipboard

Fix import for extras in go.mod file

Open dwallacelf opened this issue 1 year ago • 3 comments

When I attempt to add the two references to a go.mod file

go.fd.io/govpp.git v0.8.0
go.fd.io/govpp.git/extras v0.1.0

and then I run go mod tidy, I get this error a lot:

git.fd.io/govpp.git: go.fd.io/[email protected]: no secure protocol found for repository
git.fd.io/govpp.git/binapi/memif: go.fd.io/[email protected]: no secure protocol found for repository

    

What should I be adding to go.mod so that I can use libmemif and govpp. I also tried to use github.com/FDio/govpp but go mod hates that even more.


Originally posted by @Sophrinix in https://github.com/FDio/govpp/issues/122#issuecomment-1870711347

dwallacelf avatar May 02 '24 13:05 dwallacelf

Here is a link to a closed issue where this has been addresses previously: https://github.com/FDio/govpp/issues/111

ondrej-fabry avatar May 16 '24 13:05 ondrej-fabry

@Sophrinix Need more information to be able to help you, as I'm not really sure what is happening here, but the error no secure protocol found for repository seems unrelated to extras actually.

ℹ️ Can you provide the following information?

  • what version of go tooling are you running (run go version)
  • what version of go is defined in your go.mod file of your project?

ondrej-fabry avatar May 22 '24 12:05 ondrej-fabry

There actually is issue with importing GoVPP's extras go module, but the problem does not show any erorr like you are seeing.

It short, you have to use GOPROXY=direct, because the data in the proxy is invalid.

➤ go list -json -m -versions go.fd.io/govpp/[email protected]
{
	"Path": "go.fd.io/govpp/extras",
	"Version": "v0.1.0",
	"Versions": [
		"v0.6.0-alpha",
		"v0.6.0",
		"v0.7.0",
		"v0.8.0-alpha",
		"v0.10.0"
	],
	"Time": "2019-07-03T15:00:28Z",
	"Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/[email protected]",
	"GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.mod",
	"GoVersion": "1.18",
	"Origin": {
		"VCS": "git",
		"URL": "https://github.com/FDio/govpp",
		"Ref": "refs/tags/v0.1.0",
		"Hash": "b1006dced4cc0c23d9dc754e97d89500aeb55170"
	}
}
➤ GOPROXY=direct go list -json -m -versions go.fd.io/govpp/[email protected]
{
	"Path": "go.fd.io/govpp/extras",
	"Version": "v0.1.0",
	"Versions": [
		"v0.1.0"
	],
	"Time": "2019-07-03T15:00:28Z",
	"Dir": "/home/ondrej/go/pkg/mod/go.fd.io/govpp/[email protected]",
	"GoMod": "/home/ondrej/go/pkg/mod/cache/download/go.fd.io/govpp/extras/@v/v0.1.0.mod",
	"GoVersion": "1.18",
	"Origin": {
		"VCS": "git",
		"URL": "https://github.com/FDio/govpp",
		"TagPrefix": "extras/",
		"TagSum": "t1:x7xgAj5aeOC+DZu5HLiZUY3DgMQA9RRScS5l/36Vcls=",
		"Ref": "refs/tags/v0.1.0",
		"Hash": "b1006dced4cc0c23d9dc754e97d89500aeb55170"
	}
}

ondrej-fabry avatar May 22 '24 16:05 ondrej-fabry