-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
cmd/go: go get -d -u on AWS code commit repository fails #32166
Comments
Try |
Adding
Isn't
To my .gitconfig file but it did not help. |
Perhaps not directly related, but #25792 is older AWS CodeCommit vgo bug, and includes final comment:
@baxtex Probably worth at least skimming that bug. |
After some more research, I discovered that I probably don't need to do go get/git clone at all. As I'm running this on AWS code build, it already has access to the repository. So I realized I could use the COPY command instead. Here is my updated dockerfile:
As you can see, I use copy to copy in my own battery historian repository instead of using go get. Do I have to do something more? Because when I study my logs, it looks like it cannot find all my dependencies:
For reference, the repo I got on Code commit is a clone of googles battery historian: https://github.com/google/battery-historian |
@baxtex - Have you manually checked that Could you use And in any case, this does not seem to be a Go issue anymore as you are just copying files. |
Timed out in state WaitingForInfo. Closing. (I am just a bot, though. Please speak up if this is a mistake or you have the requested information.) |
I don't know if you are still having issues, but i've managed to solve this by running this command And so now i'm able to get Go packages from AWS CodeCommit using this command The ${AWS_REGION} placeholder has to be replaced with the actual region the repository is, for example in my case is EUWest1, so in the go get command i replaced it with "eu-west-1". TL;DR
|
What version of Go are you using (
go version
)?Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?go env
OutputWhat did you do?
Trying to run go get on a repository hosted on code commit:
go get -d -u git-codecommit.eu-west-1.amazonaws.com/v1/repos/myRepo
What did you expect to see?
The repository cloned and dependencies installed.
What did you see instead?
package git-codecommit.eu-west-1.amazonaws.com/v1/repos/myRepo: unrecognized import path "git-codecommit.eu-west-1.amazonaws.com/v1/repos/myRepo" (parse https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/myRepo?go-get=1: no go-import meta tags ())
My machine is properly setup with SSH keys so
git clone ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/myRepo
works fine. Also take note that my end goal is to the the build pipeline on AWS Code build run the dockerfile in the end but as of now it gives the same result as running it locally.The text was updated successfully, but these errors were encountered: