git - What's the proper way to "go get" a private repository? -
i'm searching way go get
work private repository, after many google try.
the first try
$ go -v gitlab.com/secmask/awserver-go fetching https://gitlab.com/secmask/awserver-go?go-get=1 https fetch failed. fetching http://gitlab.com/secmask/awserver-go?go-get=1 parsing meta tags http://gitlab.com/secmask/awserver-go?go-get=1 (status code 200) import "gitlab.com/secmask/awserver-go": parse http://gitlab.com/secmask/awserver-go?go-get=1: no go-import meta tags package gitlab.com/secmask/awserver-go: unrecognized import path "gitlab.com/secmask/awserver-go
yep, did not see meta tags because not know how provide login information???
second try follow https://gist.github.com/shurcool/6927554. add config .gitconfig
[url "ssh://git@gitlab.com/"] insteadof = https://gitlab.com/ $ go -v gitlab.com/secmask/awserver-go --> not work $ go -v gitlab.com/secmask/awserver-go.git --> work got src/gitlab.com/secmask/awserer-go.git
yes work .git
extension project name, can rename original everytime go get
not good, there otherway?
the proper way manually put repository in right place. once repository there, can use go -u
update package , go install
install it. package named
github.com/secmask/awserver-go
goes into
$gopath/src/github.com/secmask/awserver-go
the commands type are:
cd $gopath/src/github.com/secmask git clone git@github.com:secmask/awserver-go.git
Comments
Post a Comment