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

Unable to update checked out version: fatal: Not a git repository (or any of the parent directories): .git #409

Closed
franciscocpg opened this Issue Apr 21, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@franciscocpg
Copy link

franciscocpg commented Apr 21, 2017

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

go version go1.8.1 linux/amd64

What operating system and processor architecture are you using?

Linux 4.4.0-72-generic #93-Ubuntu SMP Fri Mar 31 14:07:41 UTC 2017 x86_64 x86_64 x86_64 GNU/Linux

What did you do?

I am using the HEAD of master branch (commit 536f25f) and after running dep ensure -v I got:

ensure Solve(): No versions of github.com/aws/aws-sdk-go met constraints:
	v1.8.15: Unable to update checked out version: fatal: Not a git repository (or any of the parent directories): .git

In fact the error is a bit longer than that because it's repeating the Unable to update checked out version: fatal: Not a git repository (or any of the parent directories): .git for every tag of the aws-sdk-go project.

Like suggested here #387 (comment) it seems a problem with update to gps v0.16.0 because this problem is fixed if I change to b839831e75440c4c09f69d26b0b54853bba35092 commit and happens again in any commit after that.

@sdboyer

This comment has been minimized.

Copy link
Member

sdboyer commented Apr 21, 2017

hi! thanks for posting the issue!

Oi, that aws-sdk-go repo...I seem to see that a disproportionate amount of the time, givin' problems. Is the project you're working on public, so that I can more directly reproduce the error? And, is the error itself reproducible on subsequent dep ensure runs?

Clearly, it's able to retrieve a version list (because that's where v1.8.15 comes from), but somehow has apparently gotten around the checks that are supposed to ensure the repository has been locally set up in the cache prior to performing operations...

@franciscocpg

This comment has been minimized.

Copy link

franciscocpg commented Apr 21, 2017

Hi @sdboyer
It's not a public project, :(.
It happens all the time. I am not being able to have a valid vendor folder until I rollback to b839831e75440c4c09f69d26b0b54853bba35092.

I'm going to try to reproduce this situation in a new repository.

@franciscocpg

This comment has been minimized.

Copy link

franciscocpg commented Apr 21, 2017

I am able to reproduce this problem with this simple go file in my linux machine

package main

import "github.com/aws/aws-sdk-go/aws"

func main() {
}

But there is something strange, this error doesn't happen in my macOS machine (same golang version and dep commit) so I started to suspect this is somehow related to cache folder.

After removing the folder $GOPATH/pkg/dep/sources/https---github.com-aws-aws--sdk--go and running dep ensure again the problem was fixed.

I went further investigating this using golang:1.8.1 docker image and I am able to reproduce the problem again.

Here are the steps I did:

  • Created a folder $GOPATH/src/github.com/franciscocpg/test and a file main.go with the contents above.
  • Then I ran docker run --rm -it -v $(pwd):/go/src/github.com/franciscocpg/test -w /go/src/github.com/franciscocpg/test golang:1.8.1 bash
  • Inside the container go get -u github.com/golang/dep/...
  • Then dep ensure
  • Wait sometime (like 5 seconds) and then press CTRL^C
  • Got this error
Signal received: waiting for 1 ops to complete...
solve error: No versions of github.com/aws/aws-sdk-go met constraints:
	v1.8.16: this SourceMgr has been released, its methods can no longer be called
ensure Solve(): No versions of github.com/aws/aws-sdk-go met constraints:
	v1.8.16: this SourceMgr has been released, its methods can no longer be called
  • Then the next dep ensure causes the problem ensure Solve(): No versions of github.com/aws/aws-sdk-go met constraints: until I rm -rf $GOPATH/pkg/dep/sources/https---github.com-aws-aws--sdk--go

So it looks like something is not being clean up when the process is interrupted.

Just reminding that this error happens only after integration with gps v0.16.0.

@nexneo

This comment has been minimized.

Copy link

nexneo commented Apr 25, 2017

Thanks, this happened with one of my project as well. After I force cleaned $GOPATH/pkg problem disappeared.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment