gopherdata / gopherdata/gophernotes

Cannot import package from a private repo inside a group

Abierto
#209 10 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Go
Estrellas
4k
Forks
264
Merge medio
7 d 21 h
PR fusionados (30 d)
1

Descripción

I am trying to import a module from a private repo.

`import "gitlab.private-repo.com/sre/scout/flowgraph-api.git"`

Notice that `plowgraph-api` lives inside `scout` group inside `sre` , which may complicate things.

Go get from command line outside jupyter works:
```
❯ go get -v gitlab.private-repo.com/sre/scout/flowgraph-api.git
get "gitlab.private-repo.com/sre/scout": found meta tag get.metaImport{Prefix:"gitlab.private-repo.com/sre/scout", VCS:"git", RepoRoot:"https://gitlab.private-repo.com/sre/scout.git"} at //gitlab.private-repo.com/sre/scout?go-get=1
go get: gitlab.private-repo.com/sre/scout/flowgraph-api.git@v1.3.2: parsing go.mod:
module declares its path as: gitlab.private-repo.com/sre/scout/flowgraph-api
but was required as: gitlab.private-repo.com/sre/scout/flowgraph-api.git

```

However importing in jupyter, I get the following error
`error loading package "gitlab.private-repo.com/sre/scout/flowgraph-api.git/api/client" metadata: packages.Load() could not find package "gitlab.private-repo.com/sre/scout/flowgraph-api.git/api/client"`

I tried multiple formatts for import statements

![image](https://user-images.githubusercontent.com/29500178/81177944-21a99780-8fb0-11ea-987d-4bd6a0a44c44.png)

```
❯ go env
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/david/.cache/go-build"
GOENV="/home/david/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/david/go"
GOPRIVATE=""
GOPROXY="direct"
GOROOT="/home/david/go/go1.13.10/go"
GOSUMDB="off"
GOTMPDIR=""
GOTOOLDIR="/home/david/go/go1.13.10/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD="/dev/null"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build040957544=/tmp/go-build -gno-record-gcc-switches"
```

Any help would be appreciated, thanks!

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.