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

No url found for submodule path 'vendor/github.com/ogier/pflag' in .gitmodules #1

Open
TylerRick opened this issue Dec 12, 2017 · 1 comment

Comments

@TylerRick
Copy link

When I cloned the repo, I got this...

git clone git@github.com:micahhausler/container-tx.git
Cloning into 'container-tx'...
remote: Counting objects: 165, done.
remote: Total 165 (delta 0), reused 0 (delta 0), pack-reused 165
Receiving objects: 100% (165/165), 140.38 KiB | 0 bytes/s, done.
Resolving deltas: 100% (40/40), done.
fatal: No url found for submodule path 'vendor/github.com/ogier/pflag' in .gitmodules

I don't see a .gitmodules so was surprised it even had any way to know that path was supposed to be a submodule.

But I learned from https://stackoverflow.com/a/4185579/47185 that git stores submodule directories with a special mode '160000'. Running git ls-files --stage | grep 160000 confirms that it is a submodule:

160000 45c278ab3607870051a2ea9040bb85fcb8557481 0	vendor/github.com/ogier/pflag
160000 ec7fdbb58eb3e300c8595ad5ac74a5aa50019cc7 0	vendor/github.com/sergi/go-diff
160000 e4d366fc3c7938e2958e662b4258c7a89e1f0e3e 0	vendor/gopkg.in/yaml.v2

I'm guessing you just forgot to add the .gitmodules file to git?

Anyway, the missing submodule leads to this error when I try to build (following the instructions from the Dockerfile):

docker run --rm -v $(pwd):/go/src/github.com/micahhausler/container-tx -w /go/src/github.com/micahhausler/container-tx golang:1.7  go build -v -a -tags netgo -installsuffix netgo -ldflags '-w'
Unable to find image 'golang:1.7' locally
1.7: Pulling from library/golang
ad74af05f5a2: Pull complete 
2b032b8bbe8b: Pull complete 
a9a5b35f6ead: Pull complete 
25d9840c55bc: Pull complete 
abeecada453e: Pull complete 
98b5f0802231: Pull complete 
aca2591b4a7e: Pull complete 
Digest: sha256:93b2b52f1212e97b6650bde1f20f6a359b08c117c57a848970d615fe88623a3d
Status: Downloaded newer image for golang:1.7
main.go:12:2: cannot find package "github.com/ogier/pflag" in any of:
	/go/src/github.com/micahhausler/container-tx/vendor/github.com/ogier/pflag (vendor tree)
	/usr/local/go/src/github.com/ogier/pflag (from $GOROOT)
	/go/src/github.com/ogier/pflag (from $GOPATH)
compose/compose.go:11:2: cannot find package "gopkg.in/yaml.v2" in any of:
	/go/src/github.com/micahhausler/container-tx/vendor/gopkg.in/yaml.v2 (vendor tree)
	/usr/local/go/src/gopkg.in/yaml.v2 (from $GOROOT)
	/go/src/gopkg.in/yaml.v2 (from $GOPATH)
TylerRick added a commit to TylerRick/container-tx that referenced this issue Dec 12, 2017
Fixes git errors such as:
  fatal: No url found for submodule path 'vendor/github.com/ogier/pflag' in .gitmodules

Resolves micahhausler#1
@micahhausler
Copy link
Owner

Yea honestly I've been meaning to switch to dep, but this project hasn't had a whole lot of love in the last year.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants