1

I'm new to GO and AWS. I have succesfully followed the instructions here https://github.com/google/battery-historian and been able to get the project running locally. Now I want to host it on our AWS code commit instead as we don't use git. I have created a new repository like this:

battery-historian/
    activity
    aggregated
    ...
    setup.go

and then tried running the following command;

go get -d -u ssh://git-codecommit.us-west-1.amazonaws.com/v1/repos/battery-historian/... from my Linux terminal

I keep getting "invalid char ':". I guess this is because of the ssh protocol. If I run without protocol, I get

package git-codecommit.us-west-1.amazonaws.com/v1/repos/battery-historian/...: unrecognized import path "git-codecommit.us-west-1.amazonaws.com/v1/repos/battery-historian" (parse https://git-codecommit.us-west-1.amazonaws.com/v1/repos/battery-historian?go-get=1: no go-import meta tags ())

I have worked with code commit before and only used ssh and it have worked fine. I have modified my .ssh/config file with my amazon User and rsa key.

How do I use the go get command on code commit repositories using ssh auth?

I have looked at What's the proper way to "go get" a private repository? but I'm unable to get it working. All examples are for Github. If I clone the repo normally and then run go get -u I get

-init --recursive
fatal: No url found for submodule path 'third_party/closure-library' in .gitmodules
package github.com/google/battery-historian: exit status 128
kalle556
  • 11
  • 2

0 Answers0