Skip to content
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

go mod tidy: malformed file path: invalid char ':' #38253

Closed
harche opened this issue Apr 5, 2020 · 2 comments
Closed

go mod tidy: malformed file path: invalid char ':' #38253

harche opened this issue Apr 5, 2020 · 2 comments

Comments

@harche
Copy link

harche commented Apr 5, 2020

What version of Go are you using (go version)?

$ go version
go version go1.14.1 linux/amd64

Does this issue reproduce with the latest release?

Yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/harshal/.cache/go-build"
GOENV="/home/harshal/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOINSECURE=""
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/harshal/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/home/harshal/go/src/github.com/harche/machine-config-client/go.mod"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build054821319=/tmp/go-build -gno-record-gcc-switches"

What did you do?

Sample code,

package main

import (
	"fmt"

	mcfgv1 "github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1"
)

func main() {
	mc := *mcfgv1.MachineConfig{}
	fmt.Println(mc)
}
$ go mod tidy 
go: finding module for package github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1
go: downloading github.com/openshift/machine-config-operator v3.11.0+incompatible
github.com/harche/machine-config-client imports
	github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1: create zip: malformed file path "pkg/controller/template/test_data/templates/aws/master/files/-etc-docker-certs.d-docker-registry.default.svc:5000-ca.crt": invalid char ':'
$ go get github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1
go: downloading github.com/openshift/machine-config-operator v3.11.0+incompatible
go get github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1: create zip: malformed file path "pkg/controller/template/test_data/templates/aws/master/files/-etc-docker-certs.d-docker-registry.default.svc:5000-ca.crt": invalid char ':'

What did you expect to see?

go mod tidy to succeed.

What did you see instead?

$ go mod tidy 
go: finding module for package github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1
go: downloading github.com/openshift/machine-config-operator v3.11.0+incompatible
github.com/harche/machine-config-client imports
	github.com/openshift/machine-config-operator/pkg/apis/machineconfiguration.openshift.io/v1: create zip: malformed file path "pkg/controller/template/test_data/templates/aws/master/files/-etc-docker-certs.d-docker-registry.default.svc:5000-ca.crt": invalid char ':'

Seems like it's related #28001, but I am seeing this even in latest release go1.14.1 linux/amd64

@harche
Copy link
Author

harche commented Apr 5, 2020

@bcmills looking at your comment, changing the files at source pkg/controller/template/test_data/templates/aws/master/files/-etc-docker-certs.d-docker-registry.default.svc:5000-ca.crt to remove the offending character is the only solution?

@harche
Copy link
Author

harche commented Apr 5, 2020

Nevermind, closing this issue because the original author of the module I am trying to import acknowledges the issue.

@harche harche closed this as completed Apr 5, 2020
@golang golang locked and limited conversation to collaborators Apr 5, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants