kubernetes-sigs/aws-iam-authenticator

Go install fails on v0.6.10

TJonesy opened this issue · 8 comments

This pr caused go install sigs.k8s.io/aws-iam-authenticator/cmd/aws-iam-authenticator@v0.6.10 to no longer work. It returns the following error:

$ go install sigs.k8s.io/aws-iam-authenticator/cmd/aws-iam-authenticator@v0.6.10
go: sigs.k8s.io/aws-iam-authenticator/cmd/aws-iam-authenticator@v0.6.10 (in sigs.k8s.io/aws-iam-authenticator@v0.6.10):
        The go.mod file for the module providing named packages contains one or
        more replace directives. It must not contain directives that would cause
        it to be interpreted differently than if it were the main module.

After some digging I found this issue which if I understand correctly means that replace directives cannot be used in go.mod files that have a main module.

Hah, reading that Go issue makes me mad!

Anyways for getting my go install of aws-iam-authenticator working, downgrading to v0.6.9 (diff) seems to build:

go install sigs.k8s.io/aws-iam-authenticator/cmd/aws-iam-authenticator@v0.6.9

go: finding module for package sigs.io/aws-iam-authenticator/pkg/token
sigs.io/aws-iam-authenticator/pkg/token: cannot find module providing package sigs.io/aws-iam-authenticator/pkg/token: unrecognized import path "sigs.io/aws-iam-authenticator/pkg/token": https fetch: Get "https://sigs.io/aws-iam-authenticator/pkg/token?go-get=1": x509: certificate has expired or is not yet valid: current time 2023-06-06T16:39:29+08:00 is after 2022-09-18T12:00:00Z.

I also found an issue to run go mod tidy