I am having some issues cloning my go repository to my local machine.
I am running Ubuntu 18 and did a complete reinstall following these commands:
dpkg -l|grep golang # if you see any, run following cmd to remove
sudo apt-get purge golang-*
sudo rm -rf /usr/local/go
ew_golang_ver=$(curl https://golang.org/VERSION?m=text 2> /dev/null)
cd /tmp
wget https://dl.google.com/go/${new_golang_ver}.linux-amd64.tar.gz
sudo tar -C /usr/local -xzf ${new_golang_ver}.linux-amd64.tar.gz
Added these to bashrc
export PATH=/usr/local/go/bin:${PATH}
export GOPATH=${HOME}/gopath # typical value change at will
export PATH=${GOPATH}/bin:${PATH}
source ~/.bashrc
go version
outputs
go version go1.13 linux/amd64
Now I have a repository with a go project on AWS Code commit that I would like to Clone. These are the commands I tried and the output:
go get ssh://git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo
package ssh:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo: ssh:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo: invalid import path: malformed import path "ssh:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo": invalid char ':'
go get https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo
package https:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo: https:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo: invalid import path: malformed import path "https:/git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo": invalid char ':'
go get git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo
package git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo: unrecognized import path "git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo" (parse https://git-codecommit.eu-west-1.amazonaws.com/v1/repos/myGoRepo?go-get=1: no go-import meta tags ())
I can do git clone just fine though.
So this leads me to two questions:
- Can I use go get command with AWS Code Commit at all?
- Can I use git clone command and then install the project in some other way? Where should I clone it? What go commands to use? In my project I have a setup.go file that generates some files as well as a cmd folder with another go file with my main function.