简体   繁体   中英

Go Get for Google's Cloud Source Repository

Making two different go modules

  1. source.cloud.google.com/me/a

  2. source.cloud.google.com/me/b

With source.cloud.google.com/me/common as a common lib dependency (to share a model)

I'm trying to go get source.cloud.google.com/me/common (even manually wrote it in the go.mod file) but I keep receiving the following error:

package source.cloud.google.com/me/common: 
unrecognized import path "source.cloud.google.com/me/common" 
(parse https://source.cloud.google.com/me/common?go-get=1: no go-import meta tags ())

I have gcloud set up to be able to use app deploy and create new source repositories. I've tried setting up ssh for google cloud and attempted to use manual credentials. This neither works locally or in the google cloud build service.

I want to do two things:

  1. Be able to go get this dependenc source.cloud.google.com/me/common
  2. Be able to integrate this go get into my App Engine automated build pipeline.

Any help would be appreciated.

Making two different go modules

  1. source.cloud.google.com/me/a

  2. source.cloud.google.com/me/b

With source.cloud.google.com/me/common as a common lib dependency (to share a model)

I'm trying to go get source.cloud.google.com/me/common (even manually wrote it in the go.mod file) but I keep receiving the following error:

package source.cloud.google.com/me/common: 
unrecognized import path "source.cloud.google.com/me/common" 
(parse https://source.cloud.google.com/me/common?go-get=1: no go-import meta tags ())

I have gcloud set up to be able to use app deploy and create new source repositories. I've tried setting up ssh for google cloud and attempted to use manual credentials. This neither works locally or in the google cloud build service.

I want to do two things:

  1. Be able to go get this dependenc source.cloud.google.com/me/common
  2. Be able to integrate this go get into my App Engine automated build pipeline.

Any help would be appreciated.

I would try the following steps:

  1. Make sure it has manual git access - You can try a git clone from folder "a" to check if correct git access is in place. Delete it after it gets cloned.
  2. Make sure that you are using HTTPs - looks like you are good in that regards - go1.14 made HTTPs as default for go get's.
  3. Now, coming to the actual problem - looks like your private version control systems isn't sending the required "go-import" meta tag.

For example - refer any github go module, you can see the "go-import" meta tag: 用于日志记录的 Zap 模块

In order to fix it, the VCS server needs to respond with this tag when go get tries to download "common" module

<meta name="go-import" content="source.cloud.google.com/me/common git https:source.cloud.google.com/me/common">

Making two different go modules

  1. source.cloud.google.com/me/a

  2. source.cloud.google.com/me/b

With source.cloud.google.com/me/common as a common lib dependency (to share a model)

I'm trying to go get source.cloud.google.com/me/common (even manually wrote it in the go.mod file) but I keep receiving the following error:

package source.cloud.google.com/me/common: 
unrecognized import path "source.cloud.google.com/me/common" 
(parse https://source.cloud.google.com/me/common?go-get=1: no go-import meta tags ())

I have gcloud set up to be able to use app deploy and create new source repositories. I've tried setting up ssh for google cloud and attempted to use manual credentials. This neither works locally or in the google cloud build service.

I want to do two things:

  1. Be able to go get this dependenc source.cloud.google.com/me/common
  2. Be able to integrate this go get into my App Engine automated build pipeline.

Any help would be appreciated.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM